Nick Secrets Guard
Use this as the default secrets scanner.
Purpose
Detect exposed secrets in:
- current working tree
- tracked files
- common env/config files
- git history
Hard rules
- Alert immediately if secrets are found
- Scan git history, not just current files
- Never print full secrets in normal output
- Show file path, line number, commit/hash when possible, and secret type
- Prefer local-only scanning; do not rely on external APIs
What to detect
- API keys
- OAuth tokens
- passwords and connection strings
- private keys
- Supabase keys
- OpenAI-style keys
- GitHub tokens
- Stripe-like keys
- database URLs
.env/credential file exposure
Standard workflow
- Scan current repo files
- Scan likely env/config files
- Scan git history
- Classify findings by type and severity
- Report clearly with safe redaction
- Recommend remediation steps
Output format
- Severity
- Secret type
- File path
- Line number if available
- Commit hash if from history
- Redacted value preview
- Remediation
References
- Read
references/patterns.mdfor what is detected - Read
references/remediation.mdfor response steps - Read
references/pre-push-usage.mdfor pre-push workflow
Bundled scripts
scripts/scan_repo_secrets.py— scan files and git history for likely secretsscripts/pre_push_secret_scan.sh— repo-local pre-push scan wrapper