secret-scanner
Skill13 starsChanged 5 months agoMITView on GitHub
Scan a codebase for hardcoded secrets — API keys, tokens, private keys and passwords — using a custom regex + Shannon-entropy engine. Use when the user asks to "find secrets", "check for leaked credentials", "scan for API keys", do a pre-commit secret check, or audit a repo before making it public.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Sagargupta16/agent-recipestheir own version, first seen Nov 1, 2026
- BryceYuuu/open-workflow-skillstheir own version, first seen Sep 5, 2026
- bestdeejay-design/agent-skillstheir own version, first seen Aug 9, 2026
- srikanth-manivannan/claude-agent-factorytheir own version, first seen Jun 26, 2026
- Cat-tj/secret-scannertheir own version, first seen Apr 6, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- bestdeejay-design/agent-skills★ 6same name
- Sagargupta16/agent-recipes★ 4same name
- BryceYuuu/open-workflow-skills★ 1same name
- srikanth-manivannan/claude-agent-factory★ 1same name
- Cat-tj/secret-scanner★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- cors-auditorSkill
- dependency-checkSkill
- dockerfile-scanSkill
- http-sec-auditSkill
- jwt-inspectorSkill
- prompt-injection-testerSkill
- sast-liteSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 61
Run the scanner with --json and parse the findings.
- Distinctive: line 66
If the secret is in git history, recommend git filter-repo / BFG and credential rotation — deleting the line is not enough.
- Very specific: line 73
If a finding is a known dummy value, treat it as noise.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Secret Scanner
A dependency-free engine that finds committed credentials by combining high-signal vendor regex rules (AWS, GitHub, GCP, Stripe, OpenAI, Anthropic, Hugging Face, Replicate, Groq, Cohere, DigitalOcean, Slack, …) with Shannon-entropy gating to catch generic secrets while keeping false positives low.
When to use this skill
- "Are there any secrets / API keys committed in this repo?"
- "Scan this folder before I open-source it."
- Pre-commit / pre-push credential checks.
- Investigating a suspected leak.
How to run it
The engine has no third-party dependencies — just Python 3.9+.
# Human-readable report (default)
python skills/secret-scanner/engine.py .
# Machine-readable JSON (pipe into other tooling)
python skills/secret-scanner/engine.py . --json
# Tune entropy sensitivity (lower = more findings)
python skills/secret-scanner/engine.py src/ --min-entropy 3.0
# Include test directories (skipped by default)
python skills/secret-scanner/engine.py . --include-testsExit codes: 0 clean · 1 findings present · 2 usage error.
This makes it drop-in for CI: a non-zero exit fails the build.
How to interpret results
Each finding reports severity, rule_id, path:line:column, a redacted
preview of the value (never the full secret), and the measured entropy.
Severity guide:
- critical — live credential material (private keys, cloud secret keys, provider tokens). Rotate immediately.
- high — access key IDs, third-party API keys.
- medium — generic
password=/secret=assignments. - low — JWTs and other context-dependent values; verify before acting.
Recommended workflow for Claude
- Run the scanner with
--jsonand parse the findings. - For each finding, open the file at the reported line to confirm it is a real secret and not a placeholder/test fixture.
- Report confirmed leaks grouped by severity, and advise the user to rotate the credential (committing a fix does not un-leak git history).
- If the secret is in git history, recommend
git filter-repo/ BFG and credential rotation — deleting the line is not enough.
False positives
The engine already filters obvious placeholders (example, <your-key>,
xxxx, changeme, ${ENV}, etc.) and gates generic rules behind entropy.
If a finding is a known dummy value, treat it as noise. To re-check with
stricter entropy, raise --min-entropy.
Notes
- Binary files,
node_modules,.git, virtualenvs and oversized files are skipped automatically. - The scanner never prints full secret values — only redacted previews.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

