# Vloex sample audit bundle — what's inside

This is a **real, offline-verifiable** Vloex audit-chain export (bundle v2) — the same bundle shape a customer downloads from `GET /api/v1/audit/chain/export`. It contains no customer data; every event below is synthetic. It was produced by `packages/backend/scripts/generate_sample_audit_bundle.py`, which runs the actual signing + Merkle-anchor + signed-checkpoint + export pipeline end to end.

## How to verify it yourself (no account, no trust in us)

```
unzip vloex-audit-sample.zip -d vloex-sample
cd vloex-sample
pip install cryptography
python vloex-verify.py . --jwks jwks.json
```

(For a customer deployment you would pass the PUBLIC JWKS URL from `trust.json` instead of the bundled copy, and add `--checkpoint-cross-check` to byte-compare the bundle's checkpoints against the live public log.)

Expected output (exit code 0):

```
== Vloex audit-chain verifier v2 ==
[1] log-key resolution
    log key 2vtG-2uSzmn-8PfCqgvfopBCP-lhXM3uLW3OD3ZpU-o ← local file jwks.json (as independent as your copy of it)
    PASS — 1 log key(s) resolved
[2] checkpoint signatures (Ed25519 over verbatim note bodies)
    PASS  2026-06-24 seq 0  (kid 2vtG-2uSzmn-8PfCqgvfopBCP-lhXM3uLW3OD3ZpU-o)
    PASS — 1/1 checkpoint signature(s) verified
[3] prev_root chain continuity
    note: first checkpoint has prev '-' (start of this org's chain)
    PASS — 1 checkpoint(s) chain continuously
[4] device-key manifest (keys.jws)
    PASS — manifest signature verifies (kid 2vtG-2uSzmn-8PfCqgvfopBCP-lhXM3uLW3OD3ZpU-o, seq 1, 3 device key(s))
    PASS — every checkpoint's `keys` line resolves to a manifest in this bundle
[5] per-event device keys + signatures
    PASS — 12 v2 device signature(s) verified over payload_hash hex bytes against manifest keys
[6] leaf hashes + Merkle inclusion proofs
    12 event(s) prove into their anchored roots (0 pending_anchor, 0 non-verified skipped)
[7] summary
    events by status: verified=12
    device signatures: 12 v2 verified offline, 0 v2 unchecked, 0 v1 legacy
    key provenance: local file jwks.json (as independent as your copy of it)
    payload_hash ↔ original text binding is verifiable only by a party holding the original event content (e.g. your SIEM export).
OK: 12 events verified against 1 anchors ( 0 pending_anchor, 0 non-verified skipped) [ECDSA-P256: 3, Ed25519: 9]
RESULT: PASS — full independent verification
```

Now tamper — three different broken links, three DISTINCT failure modes (each exits 1):

- flip one hex digit of any `payload_hash` in `events.jsonl` → `FAIL(leaf)` — the re-derived leaf no longer matches the Merkle commitment
- change one character of a device JWK inside `keys.jws` → `FAIL(manifest_sig)` — the log key's JWS signature no longer covers the manifest
- edit the root line inside `checkpoints.txt` → `FAIL(checkpoint_sig)` — the Ed25519 note signature no longer verifies

Tampered `events.jsonl (leaf)`:

```
    FAIL(device_sig): event 8785bfe9-b568-47ae-9dc2-e18b6939bb20 v2 device signature does not verify (mismatch)
    FAIL(leaf): leaf re-derivation MISMATCH for event 8785bfe9-b568-47ae-9dc2-e18b6939bb20 — payload_hash / key_id / signature bytes were altered
RESULT: FAIL — 2 check(s) failed (device_sig, leaf)
```

Tampered `keys.jws (manifest sig)`:

```
    FAIL(manifest_sig): keys.jws signature does NOT verify (kid 2vtG-2uSzmn-8PfCqgvfopBCP-lhXM3uLW3OD3ZpU-o) — the device-key manifest was altered after signing
    FAIL(manifest_keys_line): checkpoint 2026-06-24 seq 0 pins manifest hash 05398af1890f42f5… which matches no manifest shipped in this bundle
    FAIL(device_sig): event 29ebb913-ad68-44dd-956f-fd3f59275f20 v2 device signature does not verify (bad_pubkey)
    FAIL(device_sig): event 2bde126e-ea01-4130-bce3-a6c3061c0c2e v2 device signature does not verify (bad_pubkey)
    FAIL(device_sig): event d5caadca-319b-45a2-bd1d-89a4f03f40d9 v2 device signature does not verify (bad_pubkey)
RESULT: FAIL — 5 check(s) failed (device_sig, manifest_keys_line, manifest_sig)
```

Tampered `checkpoints.txt (checkpoint sig)`:

```
    FAIL(checkpoint_sig): 2026-06-24 seq 0: signature_invalid
RESULT: FAIL — 1 check(s) failed (checkpoint_sig)
```

## What the bundle proves — and what it doesn't

- The bundle ships **only hashes** of each event (`payload_hash`, `leaf_hash`), never the prompt or response text. Event contents are encrypted at rest and redaction-sensitive; the chain proves integrity over the hash, not the text.
- Each **signed** event's leaf is re-derived offline from `(payload_hash, key_id, signature.value)` and its Merkle inclusion proof is walked to the anchored root. The backend stores **only public keys**, so it cannot forge or rewrite a signed event — and neither can we.
- **Signing spans BOTH capture surfaces.** Coding-agent **gateway** events are signed at the MCP proxy; **browser-extension** events are signed in the Chrome MV3 service worker (`event-signer.ts`) with the SAME canonicalize contract and ECDSA-P256. The backend is capture-method-agnostic — it verifies any event carrying a signature block and folds the verified leaf into the same Merkle tree, no matter which surface produced it. This bundle demonstrates exactly that: a signed, anchored chain spanning the gateway and the browser.
- **What we do NOT claim:** that literally every event on every surface is signed. Shadow-AI / OAuth-discovery events (workspace connectors) are captured and governed but are not device-signed today, and an unenrolled or WebCrypto-less browser still degrades gracefully to unsigned. The verifier transparently skips any `status: "unsigned"` row; there are none in this sample.

## Signed gateway events (9) — in the Merkle chain

Coding-agent gateway (MCP proxy): Claude Code / Cursor calling MCP tools.

| event_id | alg | agent | scenario |
| --- | --- | --- | --- |
| `8785bfe9-b568-47ae-9dc2-e18b6939bb20` | Ed25519 | Claude Code | Claude Code tried to read services/billing/.env (secret file) via the github MCP server — BLOCKED at the gateway. |
| `d1df5c19-b6f1-4d2d-8a66-ff3612345ea5` | Ed25519 | Claude Code | Claude Code read services/api/routes/users.py — allowed. |
| `8e405f2c-0c7f-4552-9a7b-c27165de7017` | Ed25519 | Claude Code | Claude Code tried to read infra/terraform/prod.tfvars (infra secrets) — BLOCKED at the gateway. |
| `0f4dd7c5-afbf-4d4c-9390-b028679bda5c` | Ed25519 | Claude Code | Claude Code searched the repo for 'AKIA' (AWS key prefix) — warned. |
| `e826f5f4-2f42-4920-bcd9-eef054570e5c` | Ed25519 | Claude Code | Claude Code ran a SELECT over the customers table (PII) via the postgres MCP server — warned. |
| `04ce8b12-4745-4499-ab10-3d107c45786f` | Ed25519 | Cursor | Cursor read README.md — allowed. |
| `a639237f-99c5-409b-8e1e-c423dd874bcf` | Ed25519 | Cursor | Cursor opened a pull request via the github MCP server — allowed. |
| `66c38627-8021-44f4-ad80-37070a899aa3` | Ed25519 | Cursor | Cursor posted a build summary to #eng-payments via the slack MCP server — informed. |
| `46e037b0-dcfe-43e0-a674-b38b9163d122` | Ed25519 | Cursor | Cursor filed a Jira issue via the jira MCP server — allowed. |

## Signed browser-extension events (3) — in the Merkle chain

Chrome MV3 extension, ECDSA-P256 signed in the service worker — verified and anchored the same way as the gateway events.

| event_id | alg | provider | scenario |
| --- | --- | --- | --- |
| `29ebb913-ad68-44dd-956f-fd3f59275f20` | ECDSA-P256 | openai | carol@acme.test pasted a config blob containing an AWS secret key into ChatGPT — detected + blocked in the browser. Signed by the extension, folded into the chain. |
| `d5caadca-319b-45a2-bd1d-89a4f03f40d9` | ECDSA-P256 | anthropic | carol@acme.test pasted a list of customer emails into Claude.ai — PII detected + warned. Signed by the extension, folded into the chain. |
| `2bde126e-ea01-4130-bce3-a6c3061c0c2e` | ECDSA-P256 | google | carol@acme.test asked Gemini a benign refactoring question — allowed. Signed by the extension, folded into the chain. |

---

Generated 2026-08-06 for the events dated 2026-06-24. Re-runnable: `python packages/backend/scripts/generate_sample_audit_bundle.py` mints fresh keys and a fresh, independently-verifiable bundle each time.
