Secret Exposure Prevention
When to use
- On changes involving
.env, publish scripts, workflow files, and package include/exclude rules. - Before packaging/publishing distributable artifacts.
- After any secret-handling incident or near-miss.
Procedure
- Identify secret-bearing file patterns in repo and tooling context.
- Verify packaging exclude rules (
.vscodeignore,.npmignore, artifact manifests). - Verify prevention controls (pre-commit scanning, CI scanning, secret scanning backstops).
- Validate that examples and docs use placeholders, never live tokens.
- Propose targeted guardrails with minimal operational overhead.
Output format
risk_status: low|medium|highexposure_surfaces: git|artifact|logs|docsmissing_controls: specific missing guardrailsrecommended_controls: prevention-first controls in priority orderevidence: files, workflows, and policies reviewed
Standards
- Prevention first, detection second.
- Never accept shipping secret-bearing files in distributable artifacts.
- Keep false-positive handling explicit and auditable.