secrets-scan
Skill0 starsChanged 5 months agoMITView on GitHub
This skill should be used when the user asks to "scan for secrets", "Secrets prüfen", "find leaked credentials", "run gitleaks", "run trufflehog", "check for hardcoded passwords/tokens/API keys", "verify secrets", or wants to find credentials committed anywhere in the git history. Runs Gitleaks + TruffleHog in Docker and drives findings to zero, processed directly in Claude Code.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- mdigital94/vibe-shield-plugintheir own version, first seen Nov 8, 2026
- Smaui94/ClaudeSkillCollectiontheir own version, first seen Nov 8, 2026
- Phaedra-Solutions/cursor-rulestheir own version, first seen Nov 8, 2026
- manastalukdar/ai-devstudiotheir own version, first seen Oct 13, 2026
- NinjaSln-labs/agent-skillstheir own version, first seen Oct 2, 2026
- lglucas/ai-dev-operating-systemtheir own version, first seen Sep 28, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- lglucas/ai-dev-operating-system★ 12same name
- Phaedra-Solutions/cursor-rules★ 4same name
- Pradnyeshp/Claude-Skills★ 2same name
- manastalukdar/ai-devstudio★ 1same name
- NinjaSln-labs/agent-skills★ 1same name
- Jinbae10/skills★ 0same name
- mdigital94/vibe-shield-plugin★ 0same name
- Smaui94/ClaudeSkillCollection★ 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 repository11 other files it gives its agents.
- architecture-analysisSkill
- bearer-privacySkill
- build-verifySkill
- code-audit-suiteSkill
- dast-runtimeSkill
- kubescape-k8sSkill
- license-complianceSkill
- megalinter-qualitySkill
- opengrep-sastSkill
- sonarqube-qualitySkill
- trivy-securitySkill
The file
Files
Secrets Scan
Purpose
Find committed secrets that SonarQube misses. SonarQube only matches a few regex rules against the current HEAD and never confirms whether a secret is real. This skill combines two complementary engines:
- Gitleaks — a broad, fast net over the entire git history with large, tunable rulesets, entropy detection and baselining.
- TruffleHog — live verification: it calls the provider API to confirm
whether a found secret is still active (
--results=verified), so "zero" means zero real, live secrets — not zero regex matches.
They overlap on detection but TruffleHog adds verification and Gitleaks adds history breadth, so both are justified (this is "similar but more", not duplication). Trivy's secret scanner is shallower and stays in the Trivy skill.
Core Workflow (drive to zero)
- Scan:
~/.claude/skills/secrets-scan/scripts/scan.sh [TARGET_DIR] - For every finding:
- Rotate/revoke it first — a secret that was ever committed is compromised, even after deletion. Then remove it from current code and load it from an environment variable or secret manager.
- Historical-only hits (the secret is no longer in HEAD, only in past
commits): once rotated, mark them reviewed/allowlisted. Do NOT rewrite
git history (
git filter-repo, force-push) autonomously — it is destructive and breaks shared history; only on explicit human decision. - Mark a confirmed false positive in a
.gitleaksignorefile (by fingerprint) with a justification — do not weaken rules.
- Re-run until
RESULT: PASS.
Notes
- The script always scans exactly the target dir (no scope expansion) and
prints the chosen mode. It uses
gitmode (full history) only when<target>/.gitis a real directory — i.e. the target is a repo root with the object database present. A.gitfile (a linked worktree or git submodule) has its objects in the main repository, not at the target, so the script honestly falls back to working-tree-only mode (no history) and says so — run the scan on the main repo root for full history. With no.gitat all it also scans the working tree only. This avoids the false-clean a "0 commits scanned" repo would otherwise produce. - TruffleHog runs with
--results=verifiedso the report focuses on actually live secrets; change it (edit the script) for an exhaustive, noisier pass. --failmakes TruffleHog exit 183 when verified secrets are found; the script treats only that as a finding (other non-zero = operational ERROR).- A live secret is cleared only by rotation — a
.gitleaksignoreallowlist silences Gitleaks but TruffleHog re-verifies and keeps failing until revoked.
Resources
scripts/scan.sh— runs Gitleaks then TruffleHog against a directory, history-aware, exit 1 if any secret is found.
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.

