Skip to content

feat(audit): expose tamper-evident chain verification (#1356) - #1599

Merged
github-actions[bot] merged 1 commit into
Smartdevs17:mainfrom
JohnMabas:issue-1356-audit-chain
Nov 23, 2026
Merged

github-actions[bot] merged 1 commit into
Smartdevs17:mainfrom
JohnMabas:issue-1356-audit-chain

Conversation

@JohnMabas

Copy link
Copy Markdown
Contributor

What this PR does

  • Wires the existing SHA-256 audit hash chain to middleware metadata and public verification endpoints.
  • No breaking changes and no data migrations.

Changes

  • backend/src/services/auditService.ts: shared genesis/algorithm constants and a getChainTip() accessor.
  • backend/src/middleware/audit.ts: stamps each entry with details.hashAlgorithm and derives resource names past the API version segment.
  • backend/src/routes/audit.ts: enriches GET /verify with algorithm/count/tip and adds GET /chain.
  • Unit tests plus backend/docs/AUDIT_CHAIN.md.

Why

  • Auditors can verify the retained chain and read its tip without exporting the whole log.

How to test

  • npx vitest run backend/src/middleware/__tests__/audit-chain.test.ts (4 tests pass locally).
  • GET /api/v1/audit/verify and GET /api/v1/audit/chain.

Notes

@vercel

vercel Bot commented Nov 23, 2026

Copy link
Copy Markdown

@JohnMabas is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Nov 23, 2026

Copy link
Copy Markdown

@JohnMabas Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@github-actions
github-actions Bot merged commit bc560f2 into Smartdevs17:main Nov 23, 2026
16 of 33 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.

Implement tamper-evident audit logging with cryptographic chain

1 participant