Audit template
data
Audits whether your data can become wrong, lost, or leaked — and proves it with queries.
Maps to: ACIDAtomicity, Consistency, Isolation, Durability — the guarantees a database transaction provides./CAPConsistency, Availability, Partition tolerance — a distributed store can fully hold only two at once. · RLSRow-Level Security — database rules that limit which rows each user can read or write.
specialists, in parallel
Each finding is evidence-bound and survives ≥2-of-3 adversarial skeptics.
How this audit works
An engine-agnostic swarm reviews the data layer across eleven dimensions: schema and normalization, data types and precision, constraints and referential integrityA guarantee that every foreign-key value points to a row that actually exists., keys and identity, migration safety, transactions and concurrency, integrity in practice, data protection, lifecycle and deletion, pipelines, and backup/recovery. The lens is correctness, not query speed — every place the database allows invalid, orphanedRows whose referenced parent record no longer exists, leaving a dangling reference., or inconsistent state is a finding, cited to a migration file, a constraint, or a redacted row pattern. P0/P1 findings name a concrete data-loss, corruption, or leak path and survive adversarial verification before they ship.
Use it when
Before a risky production migration
You're about to add a NOT NULL column, rewrite a large table, or run a destructive backfill. The audit checks each migration for locking and blocking risk, reversibility, and a rollback path, and flags any destructive operation with no safety net — sequencing the fix as an expand/contractA migration done in phases — add the new shape, backfill, switch over, then drop the old — so it stays reversible. plan with backfill and rollback.
After bad rows show up in reporting
Billing reconciliation breaks or a join returns rows that shouldn't exist. The audit reasons about — and with read-only access spot-checks for — orphansRows whose referenced parent record no longer exists, leaving a dangling reference., duplicates, and nulls in required fields, traces them to a missing FKForeign Key — a column whose values must reference an existing row in another table., UNIQUE, or NOT NULL constraint, and ships the cleanup query plus the constraint that stops it recurring.
Multi-tenant SaaS handling PII
Before a compliance push or a security review, the audit checks that tenant isolation is enforced in the data layer rather than trusted to app code, that sensitive columns aren't stored in plaintext, and that a GDPRGeneral Data Protection Regulation — the EU law governing how personal data may be processed. right-to-erasure can actually delete a user everywhere — including backups, logs, and analytics.
What you get
A scorecard graded per dimension plus prioritized GitHub issues, each with evidence, severity, a before/after fix, and migrations sequenced with their safety plan.