Audit without re-exposing
2026-03 · Designer & builder · Pro buildSensitive data audit
An audit that finds where sensitive data lives (file, column, match count) and reports locations without emitting the values themselves.
Project brief
ShippedProblem
Teams need to locate sensitive data without putting the protected values back into reports or agent context.
Outcome
A discovery pipeline that locates sensitive data across enterprise object storage and reports where it lives (file, column, match count) never the values themselves.
Evidence
- The pipeline was built by AI agents that never had read access to the protected data themselves.
- Five independent layers, including a pre-tool-call hook, each deny access to protected paths on their own.
Key decisions
- Build zone: The pipeline was built by AI agents that never had read access to the protected data themselves.
- Guardrail zone: Five independent layers, including a pre-tool-call hook, each deny access to protected paths on their own.
- Detection zone: Deterministic pattern matching and managed entity detection run as two independent layers.
- Report zone: Output names files, columns, and match counts. The values themselves never leave the scan.
Case note
I needed a way to locate sensitive data without putting the protected values back into reports or agent context. The pipeline was built by AI agents, and rather than instruct them not to read the protected data, I constructed the workspace so they can’t. Independent layers (context exclusions, a pre-tool-call hook, per-agent tool restrictions, and related denies) each deny access on their own, while the runtime code reads those paths freely.
Figure 1 — Scan to report
The first figure follows a scan from S3 buckets to a report.
- 01S3 bucketsacross accountsread-only scan
- 02Extract textPDF · DOCX · XLSXper file
- 03Matchpattern matchingroster-derived vocabulary
- 04Entity detectionmanaged AI servicesecond detection layer
- 05Combo rulesGatesuppress false positives
- 06ReportCSV + JSONLcounts, never values
Two independent detection layers reduce false positives before anything is written to the report.
Figure 2 — Pre-tool hook denies protected paths
The second shows the guardrail hook that lets runtime code read protected data while denying the build agent that same access.
- 1Agent tool call
- 2Normalize path
- 3Match protected pathsGate
- 4Deny or allowGate
- 5Runtime reads freelysame paths, different actor
Every agent tool call is inspected. Protected-path matches are denied; everything else falls through to allow.
Zones
- Build zone
- The pipeline was built by AI agents that never had read access to the protected data themselves.
- Guardrail zone
- Five independent layers, including a pre-tool-call hook, each deny access to protected paths on their own.
- Detection zone
- Deterministic pattern matching and managed entity detection run as two independent layers.
- Report zone
- Output names files, columns, and match counts. The values themselves never leave the scan.
Cross-references
Detection is layered too: deterministic pattern matching plus managed entity detection. Publish Guardian is the publication-side cousin for secret leakage. Edit/merge separation keeps discovery reports from becoming unreviewed production change. Scans are batch-oriented and evidence-first: findings cite paths and patterns so remediation can be ticketed without guesswork.
Toolchain
Agents only see corpora inside the agreed audit boundary.
The audit stays inside an explicitly agreed boundary.
Sensitive data audit enforces what data may exist where, with classification and audit included.
Sensitive data audit runs on AWS primitives (compute, data, and IAM) treated as coded infrastructure.
Sensitive data audit codifies cloud operations so provisioning and remediation stay repeatable.
Audit scanners and report generators are Python over defined boundaries.
Agents may help classify findings; humans own scope and publication of the report.
Portfolio graph
Maps how the work here connects. Open the Portfolio graph →
- Professional
- Personal
- Skill
- Writing