Every package a maintainer publishes gets cryptographically pinned to an append-only ledger, cross-checked by five independent validators, and behaviorally scored for stolen-key misuse — before anyone downloads it.
The Problem · Quickstart · Security Stack · Architecture · Demo Scenarios · API Reference · Roadmap
xz-utils. event-stream. Two of the most consequential supply-chain compromises in open-source history had one thing in common: a valid, trusted identity shipped compromised code, and no registry, no code-signing scheme, and no centralized SBOM caught it before it spread.
Registries verify that they served a file — never that the file matches what the maintainer actually built. Code signing verifies key ownership — but a coerced or stolen key still produces a mathematically "valid" signature on malicious code. AnchorBuild closes that gap with an attestation layer no single party can silently rewrite.
|
Cryptographically links every publish event to a verified maintainer identity. Unauthorized or forged signatures are rejected at the API gate, instantly. |
Catches stolen-but-valid keys by scoring behavioral telemetry — device novelty, timezone drift, dependency jumps — that pure cryptography can't see. |
|
Five independent validator nodes (registry, npm, PyPI, two auditors) must agree. Divergence is surfaced live, not hidden. |
Every block references its parent's hash. Retroactively editing history breaks that link forever — visibly, permanently, one seam at a time. |
|
The one question that actually matters: "is it safe to install this?" — answered by combining artifact verification and this record's chain-link integrity into a single |
|
git clone <https://github.com/Srikanth-coderdal/AnchorBuild> anchorbuild
cd anchorbuild
.\start-demo.batThat one script: detects your Python environment (venv or global), boots the FastAPI backend, health-checks it before proceeding, seeds a real signed baseline ledger through the actual crypto pipeline, and launches the dashboard — all in one shot.
| Service | URL |
|---|---|
| 🖥️ Dashboard | http://localhost:5173 |
| ⚙️ API + interactive docs | http://localhost:8000/docs |
💻 Publish & verify from the CLI
# Publish a build attestation, signed with a real Ed25519 key
python -m backend.cli.attest publish \
--package my-package --version 1.0.0 \
--artifact dist/my-package.tgz \
--publisher alice --key backend/demo/keys/alice_private.hex
# Verify a downloaded artifact against the ledger
python -m backend.cli.attest verify --artifact dist/my-package.tgz
# Ask the real question: is it safe to install?
python -m backend.cli.attest can-install --hash <sha256-of-artifact>
"Every release requires a valid cryptographic signature bound to the build digest."
|
"Catches stolen-key misuse by scoring behavior before confirming commit."
|
"No single compromised party can corrupt the registry unnoticed."
|
"A high-contrast console, paired with real developer tooling."
|
flowchart TB
subgraph CLIENT["🖥️ Client Layer — React 18 / Vite / Tailwind"]
FE["Overview Dashboard<br/>Status & Anomaly Gauges"]
FORM["CLI Command Generator<br/>(never touches private keys)"]
CLI["Developer CLI<br/>publish · verify · can-install"]
end
subgraph API["⚙️ FastAPI Backend — Python 3.12"]
MAIN["main.py Router"]
ATTEST["/attestations"]
VERIFY["/verify/:hash"]
GATE["/can-install/:hash"]
DEMO["/demo/tamper · /demo/reset"]
end
subgraph ENGINE["🛡️ Security & Consensus Engine"]
ED25519["Ed25519 Engine<br/>Signature Verification"]
ML["Isolation Forest<br/>Behavioral Anomaly Score"]
CHAIN[("Append-Only Ledger<br/>SHA-256 Hash Chain")]
POA["5-Node PoA Quorum"]
end
FE -->|fetch state| MAIN
CLI -->|sign & publish| ATTEST
CLI -->|check before install| GATE
MAIN --> ATTEST & VERIFY & GATE & DEMO
ATTEST -->|verify signature| ED25519
ATTEST -->|score behavior| ML
ED25519 -->|append block| CHAIN
ML --> POA
GATE -->|artifact + chain-link check| CHAIN
POA -->|commit / diverge| FE
classDef frontend fill:#0F172A,stroke:#38BDF8,color:#FFFFFF,stroke-width:2px
classDef backend fill:#1E293B,stroke:#34D399,color:#FFFFFF,stroke-width:2px
classDef engine fill:#312E81,stroke:#A78BFA,color:#FFFFFF,stroke-width:2px
classDef db fill:#064E3B,stroke:#6EE7B7,color:#FFFFFF,stroke-width:2px
class FE,FORM,CLI frontend
class MAIN,ATTEST,VERIFY,GATE,DEMO backend
class ED25519,ML,POA engine
class CHAIN db
The seeded baseline ships with all four outcomes already on the ledger — no clicks required to see the mechanism working.
| Status | Meaning | Signature valid? | Behavior normal? | History altered? |
|---|---|---|---|---|
🟢 VERIFIED |
Signed, scored low-risk, unanimous consensus | ✅ | ✅ | No |
🟡 FLAGGED |
Validly signed, but behaviorally anomalous | ✅ | ❌ | No |
🔴 BLOCKED |
Rejected before ever reaching the ledger | ❌ | — | No |
🟣 TAMPERED |
Was valid, then retroactively altered | ✅ (originally) | — | ✅ |
Click Simulate Tamper Break on any verified block to watch the hash chain snap live, and Validator Consensus flip to DIVERGED — confirmed via the browser Network tab to fire a real POST /demo/tamper, not a client-side illusion.
| Method | Endpoint | Purpose |
|---|---|---|
GET |
/attestations |
List all ledger records |
POST |
/attestations |
Submit a signed attestation (CLI only) |
GET |
/verify/{hash} |
Check a local artifact hash against the ledger |
GET |
/can-install/{hash} |
Combined artifact + chain-link install verdict |
GET |
/anomaly-score/{id} |
Isolation Forest signal breakdown |
GET |
/validators/status |
Live PoA consensus state |
POST |
/demo/tamper · /demo/reset |
Demo-only state controls |
Full interactive spec: http://localhost:8000/docs · Source of truth: shared/openapi.yaml
Honesty about scope boundaries, not just features — a real review will ask about these:
- Identity onboarding — only 3 demo identities (Alice/Bob/Carol) are pre-registered; there is currently no self-service flow for a new maintainer to register a public key. Registering anyone without an authentication step would break the trust model, so this is deliberately deferred, not overlooked.
- Validator nodes are simulated in-process, not yet running as genuinely independent processes/machines. A real distributed PoA deployment is planned for a later phase.
- No persistence layer — the ledger currently lives in memory and resets on backend restart (by design, for repeatable demos via
start-demo.bat's seeding step). - Dashboard does not yet auto-refresh after CLI actions — a manual refresh currently surfaces new ledger state.
- IPFS off-chain storage is mocked for MVP scope; a production version would use real pinning infrastructure.