Skip to content
TrustMeshVyantraa

Guides

Audit events

What is recorded, how the hash chain works, verification and export.

What is recorded

Runtime decisions, approval requests and decisions, expiries, quarantines, policy creation/versions/activation, tool registration and schema reviews, agent registration/changes/credentials, findings and status changes, members and API keys, sign-ins, verifications and exports.

Each event has: seq, event_type, severity, actor_type, actor, agent, tool, action, decision, outcome, request_id, policy_version, details, prev_hash, record_hash, created_at.

Integrity

record_hash = sha256(prev_hash ‖ canonical_json(event)), per organization, starting from a genesis hash. The application database role has no UPDATE or DELETE privilege on audit_events, and a trigger rejects modification. Decisions and their events are written in one transaction.

POST /v1/audit/verify recomputes the chain and returns chain_valid, events_verified and first_invalid_seq.

Limit: hash-linking makes changes detectable at the application level; it is not an immutable ledger on its own. KMS-signed checkpoints and S3 Object Lock export are planned.

Search and export

GET /v1/audit/events supports q, event_type (prefix), severity (or medium+), agent, decision, actor_type, date_from, date_to, limit, offset. GET /v1/audit/export?format=csv|json (Security Analyst, Administrator, Owner) applies the same filters, up to 10,000 rows. CSV cells are guarded against formula injection, and exports from synthetic workspaces are labelled.