Skip to content

feat(web): public Audit Trail CID verification page (/verify) - #49

Merged
Eras256 merged 1 commit into
mainfrom
feat/verify-audit-trail-page
Oct 29, 2026
Merged

Eras256 merged 1 commit into
mainfrom
feat/verify-audit-trail-page

Conversation

@M0nsxx

@M0nsxx M0nsxx commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Adds /verify: paste a CID anchored by the Audit Trail Node and check it yourself instead of trusting a dashboard.

  • Fetches the anchored doc through the existing /api/ipfs proxy, retrying for the 60-90s gateway propagation window.
  • If the doc embeds a record, recomputes sha256(JSON.stringify(record)) in the browser and compares it to content_sha256. Hash-only anchors are shown as "nothing embedded to recompute", not as a mismatch.
  • If it carries an agent attestation, verifies the ed25519 signature over nirium-audit-v1:<content_sha256> server-side (/api/audit/verify-signature), accepting raw and SEP-53 encodings like the agent does.
  • Single-CID lookup only, no public feed of anchors: some anchors are someone else's evidence and aren't meant for browsing.
  • Nav entry under DEVELOPER (sidebar + navbar), EN/ES strings.

Ported from the private repo, scoped to these 7 files. The Navbar edit was applied surgically because this repo's import line already differs from the private one.

Test plan

  • New files byte-identical to the private source; dictionaries valid JSON
  • In the private repo: tsc --noEmit clean and next build passed, /verify and the signature route both compiled
  • Checked against two real mainnet anchors: record hash recomputes to the declared value; a valid signature verifies, a tampered hash is rejected
  • CI + Security Gate green on this branch's head commit

🤖 Generated with Claude Code

New /verify page: paste a CID anchored by the Audit Trail Node and
independently confirm it instead of trusting a dashboard's rendering.
Fetches the record through the existing /api/ipfs proxy (auto-retry for
the 60-90s gateway propagation window), recomputes the sha-256 of any
embedded record client-side with Web Crypto, and verifies an agent
attestation's ed25519 signature server-side (/api/audit/verify-signature).

Scoped as a single-CID lookup, not a public feed: anchors made for
someone else's evidence are not meant for open browsing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Eras256 Eras256 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified this PR against the API before approving: 7 files from apps/web, byte-identical to the ones already tested in the private repo. No personal data or secrets, nothing caught by .gitignore unintentionally.

Approved.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

@Eras256
Eras256 merged commit 2e4eb1d into main Oct 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants