Raxx · internal docs

internal · gated

DET-DATA-002 — audit log hash chain break

Rule ID: DET-DATA-002 Title: KMS HMAC hash chain verification failure across customer_audit_events Category: data Last validated: 2026-06-04 (initial catalog, dormant) State: dormant — activates when the KMS HMAC hash chain ships (gated on SC-A11 + SC-A14 deploy per project_kms_audit_chain_approved)

Telemetry source

Statistical method + baseline window

Threshold + expected FP rate

Alert route

Escalation owner

Test fixture / synthetic positive

See _fixtures/audit_log_hash_chain_break_positive.py for a synthetic 3-row chain where row 2's event_hash does not match the expected HMAC.

What to do when this fires

  1. Do not restart, redeploy, or write any new audit row until forensic snapshot is captured. Each new write changes the chain state and complicates forensics.
  2. Snapshot the table to S3 (or local file) via heroku pg:backups:capture followed by extracting the audit-events table.
  3. Identify the first broken row (chain integrity holds for rows before the break, fails for rows at-or-after).
  4. Cross-reference the break point with: deploy events, KMS key activity in CloudTrail, recent migrations, operator session windows.
  5. If the break corresponds to a known KMS rotation, fix the rotation procedure (an sre-agent task) and re-anchor.
  6. If the break does NOT correspond to operational activity: this is unambiguously adversarial tampering. Treat as data-breach posture per the (future) incident response plan.

What NOT to do