---
Before you commit config
Config is where most secret leaks start, so a pre-commit checklist is the cheapest security control you can adopt. This is a control inventory, not a pass/fail certificate — each unchecked item is a remediation task.
The checklist
- No hard-coded secrets — search for
sk_,AKIA,ghp_, passwords, and connection strings. Anything credential-shaped belongs in a manager. - No real-looking demo values — seed and sample files use obviously fake placeholders, never credential-shaped strings.
- Insecure settings off —
DEBUG=truein anything that looks like prod, wildcard CORS (*), disabled TLS, verbose logging of env vars. - Secret manager wired — values injected at runtime from env / vault / CI secrets, not read from source.
- Scanning in CI — a pre-commit hook plus a CI scan step catches both the next accident and what already exists.
- Rotation policy — short-lived, auto-rotated keys where the provider allows; a leaked long-lived key is a permanent window.
How to use the output
Each unchecked item becomes a tracked fix with an owner. A scanner like EnvLens generates the finding list (secrets + insecure settings, mapped to weakness types); your tracker assigns the owners. The finished checklist is evidence you looked — not a claim of safety.
What the checklist is not
It is a control inventory for config, not a full security audit. It does not cover application logic, dependencies, or infrastructure beyond the file you scanned. A clean checklist reduces a major exposure class; it does not make the system breach-free.
Authoritative references
- OWASP Secrets Management Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html
- CWE-798 (Hard-coded credentials): https://cwe.mitre.org/data/definitions/798.html
- OWASP Top 10 (A07): https://owasp.org/Top10/