Skip to content

Audit Trail

Every decision creates a cryptographically linked record.

Chain Structure

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Entry 1   │────►│   Entry 2   │────►│   Entry 3   │
│ hash: abc   │     │ prev: abc   │     │ prev: def   │
│             │     │ hash: def   │     │ hash: ghi   │
└─────────────┘     └─────────────┘     └─────────────┘

Entry Format

json
{
  "id": "aud_abc123",
  "timestamp": "2026-02-05T05:00:00.000Z",
  "tenantId": "tenant_123",
  "eventType": "gate.decision",
  "data": {
    "action": "send_email",
    "decision": "allow",
    "riskScore": 15
  },
  "previousHash": "sha256:abc...",
  "hash": "sha256:def..."
}

Chain Verification

typescript
const verification = await sovr.audit.verify({
  startDate: '2026-01-01',
  endDate: '2026-02-05'
});

// { valid: true, entriesChecked: 15420 }

Querying Logs

typescript
const logs = await sovr.audit.chain({
  limit: 100,
  offset: 0,
  filters: {
    eventType: 'gate.decision',
    decision: 'deny'
  }
});

Compliance Exports

  • SOC 2 format
  • ISO 27001 format
  • Custom JSON
  • PDF reports

The AI Responsibility Layer