secret-scanner
Skill6 starsChanged 3 months agoMITView on GitHub
Static secret/token scanning for codebases and git repos: detects leaked credentials (AWS, GitHub, OpenAI, Anthropic, Stripe, Google, Slack, private keys, JWTs) using gitleaks v8.30.1 pattern table + Shannon entropy gating + allowlist noise filters. Stdlib-only Python script with JSON/Markdown/text reports, redaction, CI exit-code gate.
- Reads credentials
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
- srikanth-manivannan/claude-agent-factorytheir own version, first seen Jun 26, 2026
- NovaCode37/claude-security-skillstheir own version, first seen Jun 7, 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
- NovaCode37/claude-security-skills★ 13same 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 repository59 other files it gives its agents.
- skills/chronos/references/AGENTS.mdAGENTS.md
- api-contract-testingSkill
- api-doc-generatorSkill
- canonSkill
- censorSkill
- changelog-generatorSkill
- chronosSkill
- code-reviewSkill
- commit-lintSkill
- commit-message-writerSkill
- coverage-analyzerSkill
- csv-proSkill
- data-analysisSkill
- deweySkill
- diagram-makerSkill
- doc-compareSkill
- docs-productSkill
- docs-projectSkill
- docs-systemSkill
- dsh-runnerSkill
- frontend-a11ySkill
- frontend-design-tasteSkill
- frontend-perfectionSkill
- frontend-performanceSkill
- frontend-testingSkill
- github-repo-hygieneSkill
- long-running-agent-workflowSkill
- mermaid-to-imageSkill
- mobile-frontendSkill
- pdf-report-builderSkill
- plan-skillSkill
- prd-to-appSkill
- presentation-craftSkill
- presentation-engineeringSkill
- presentation-makerSkill
- raster-to-svgSkill
- reddit-karmaSkill
- repo-community-filesSkill
- repo-metadata-healthSkill
- repo-readme-assetsSkill
- repo-social-previewSkill
- security-reviewSkill
- seo-auditSkill
- seo-contentSkill
- seo-crawlSkill
- seo-schemaSkill
- seo-toolkitSkill
- skill-feedbackSkill
- skill-forgeSkill
- skill-suggesterSkill
- sql-helperSkill
- systematic-debuggerSkill
- test-generatorSkill
- test-graphicsSkill
- velesSkill
- version-bumperSkill
- video-script-writerSkill
- web-replicationSkill
- web-scraperSkill
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
- Distinctive: line 53
Entropy gate: every entropy-sensitive rule skips values whose Shannon entropy ≤ rule minimum (gitleaks semantics)
- Very specific: line 87
Only the operator can confirm whether a secret is still live — offline heuristic check (token length/grammar, EXAMPLE suffix) is automatic.
- Very specific: line 145
Do not use as a complete dependency or architectural security review.
“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 — leaked credential detection
Load this skill when you need to scan a codebase, directory, or git repo for leaked secrets/tokens/keys (before publishing a repo, before a release, or during security review).
The scanner is static and offline by design: patterns come from the gitleaks v8.30.3 default config, the canonical open-source secret-detection rule set, and detection uses the same Shannon-entropy gating semantics as gitleaks. No network calls are made — a format match is reported as potential, not verified.
The scanner script
scripts/secret_scanner.py — pure Python 3 stdlib (no dependencies).
| Source | Command | |
| File | python3 secret_scanner.py --path path/to/file | |
| Directory (recursive) | python3 secret_scanner.py --path path/to/dir | |
| Git repo (tracked files) | secret_scanner.py --git /path/to/repo | |
| stdin (blob) | `cat file | secret_scanner.py` |
Detected pattern families (19 rules)
Critical: AWS Access Key ID (AKIA/ASIA/ABIA/A3T…) & secret key,
GitHub PAT classic/fine-grained/refresh tokens, OpenAI (sk-*T3BlbkFJ*),
Anthropic (sk-ant-api03-…AA), Stripe (sk_live_/rk_live_),
Google API key (AIza…), private keys (PEM/OpenSSH/PGP blocks).
High: Slack app/bot/user tokens and webhooks, Perplexity (pplx-…).
Medium: JWT, generic keyword-anchored API keys.
False-positive suppression (allowlists)
- Placeholders:
$VAR,${VAR},{{ }},%VAR%,true/false/null,****,EXAMPLE,xxxx,your-,placeholder,TODO— never reported - Noise paths:
node_modules/,vendor/,.git/, lockfiles (package-lock.json,go.sum,poetry.lock, …), minified JS, binaries, images, fonts - Entropy gate: every entropy-sensitive rule skips values whose Shannon entropy ≤ rule minimum (gitleaks semantics)
Capabilities
--json/--markdown/ text (default) report formats--redact N— mask secrets in output (keeps first N chars; CI-safe)--max-mb N— skip huge files (default 10 MB)--exit-code— exit 1 when findings present (CI gate), else 0
Usage example (typical)
# Full directory scan, JSON report for CI
python3 secret_scanner.py --path ./my-repo --json --redact 8 --exit-code
# Scann only tracked files of a repo
python3 secret_scanner.py --git /Users/me/projects/lovii_demo
# Markdown human-readable report
python3 secret_scanner.py --path ./app --markdown > scan-report.mdInterpretation guidance
- Critical + live risk (AWS/GitHub/OpenAI/Anthropic/etc.) → rotate the credential first, then scrub history. Assume a committed secret is compromised (forks, cache, CI logs, bots).
- Medium (generic/JWT) → verify context before alarming; check whether the value appears in tests/fixtures/docs.
- Allowlisted but suspicious → check if
.env.examplecontains a real key instead of aYOUR_KEYplaceholder. - Only the operator can confirm whether a secret is still live — offline
heuristic check (token length/grammar,
EXAMPLEsuffix) is automatic.
Canonical patterns
Full deep dive with upstream sources in references/canonical-patterns.md.
Key canons:
- gitleaks rule table (v8.30.3
config/gitleaks.toml) — the canonical regex set; entropy per-rule minimums - Shannon entropy gating —
detect/utils.go#L117-L134; skip whenentropy <= rule.Entropy(strictly greater) - Global & path allowlists — placeholders + lockfiles + binaries
- SkillSpector two-stage model — static → heuristic/human triage, baseline suppression for re-scans
- Remediation order — rotate first, scrub second (gitleaks/TruffleHog
guidance;
git filter-repo/BFG for history)
Files
SKILL.md— this fileskill.json— manifestscripts/secret_scanner.py— the stdlib scanner (pattern table + entropy + allowlists)references/canonical-patterns.md— gitleaks/Detect-secrets/TruffleHog/ SkillSpector deep dive with per-rule regexes and sources
Canonical analogues
Full source depth — in references/canonical-patterns.md. Backbone:
<table>
<tr><th>Analog</th><th>What we borrow</th></tr>
<tr><td>gitleaks (GitHub, MIT)</td><td>Pattern table, entropy thresholds, global/path allowlists, redaction, exit-code CI model</td></tr>
<tr><td>TruffleHog v3</td><td>Typed-detector philosophy; `verified` vs `unverified` framing (we stay offline)</td></tr>
<tr><td>Yelp detect-secrets</td><td>Quoted-string scanning to cut noise; keyword-anchored entropy</td></tr>
<tr><td>NVIDIA SkillSpector</td><td>Two-stage analysis; severity scoring; false-positive baseline/suppression</td></tr>
</table>Installation
# For opencode
cp -r skills/secret-scanner ~/.config/opencode/skills/
# For other agents
# Copy the skill folder to your skills directory; requires Python 3.Security note: this tool finds potential secrets. It never comments them out, does not attempt to "verify" them online, and never rewrites source files. Operators must rotate real secrets and scrub history manually — see
references/canonical-patterns.md→ Remediation workflow.
Boundaries
- Do not use as a complete dependency or architectural security review; use
security-review.
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.

