Tamper-Evident SHA-256 Audit Chain
Links every authorized action, approval, and policy version into a cryptographic hash chain you can independently verify.
Standard database logs can be silently altered, failing SOX / SOC 2 / InfoSec audits.
Any single altered character breaks hash verification immediately (neusym audit verify --anchor ...).
What It Does (In Plain English)
Audit Ledger writes an append-only FIPS 180-4 SHA-256 (or HMAC) hash chain where every record hashes the previous record. Auditors can copy a tiny <seq>:<hash> anchor to external storage (neusym audit anchor) and mathematically prove later that zero log lines were edited or deleted.
Real-World Example
- 1Every write action, approval decision, and taint declassification appends to the chain.
- 2Nightly cron pulls
GET /audit/anchorinto immutable WORM storage. - 3During audit,
GET /audit/verify?anchor=...proves the entire history is intact.
When Should You Turn It On?
Required automatically at Level 3 (execute) and Level 4 (commit).
Safety level note: Level 3 · Execute — Can run routine live actions with grants, receipts, and audit logs.
How to Add It (workspace.yaml)
level: execute
kits:
- "@neusym/kit-audit-ledger@0.1.0"Kits It Works With
Technical Details & Configuration Options (4 settings)
| Package | @neusym/kit-audit-ledger |
|---|---|
| Provides Ports | audit@1 |
| Requires Ports | None |
| Optional Ports | blobs@1notifier@1secrets@1 |
| Publishes Events | audit.witness_failed |
| Owned DB Collections | audit_entriesaudit_head |
Configuration Options (kitConfigs.audit-ledger)
| Setting | Type | Default | Description |
|---|---|---|---|
hashAlgorithm | string | "sha256" | — |
chainKeyTarget | string | — | secrets@1 credential target whose leased value keys the chain (HMAC-SHA256). Set, every entry is keyed and verifyChain requires it, so someone who can write the store cannot recompute the chain. Unset, the chain is an unkeyed SHA-256 chain. |
witnessEveryNEntries | integer | 0 | When > 0, automatically publishes an external audit witness every N appended entries. |
witnessRetentionDays | integer | 0 | When > 0, requests COMPLIANCE WORM retention for N days when writing witnesses to blobs@1. |