scanning-for-hardcoded-secrets
Scan a source-code tree for hardcoded credentials embedded in source
files: AWS access keys, GitHub tokens, Stripe keys, Slack tokens,
Anthropic API keys, OpenAI keys, JWT signing secrets, generic
base64-encoded passwords, RSA / SSH private keys, and high-entropy
string literals that pattern-match common credential shapes.
Use when: pre-commit gate before pushing a feature branch, audit
before SOC2, post-incident scan after a leak, or inheriting a
codebase you didn't write.
Threshold: any source file contains a string that matches a
canonical credential regex (AWS AKIA prefix, GitHub ghp_ prefix,
etc.) OR a string with Shannon entropy above 4.5 in a field
context (key=, token:, secret=).
Trigger with: "scan secrets", "credential scan", "find hardcoded
keys", "leak check".
Backend & APIs⭐ 2.4k4 files