amey-thakur/ai-skills/secrets-scanning
Claude Code and agent skill by amey-thakur/ai-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Scan commit history and CI for leaked credentials and rotate on every hit, because a pushed secret is already compromised. Use when hardening a repo against committed keys or responding to a suspected leak.
Install
npx vskill@latest install amey-thakur/ai-skills/secrets-scanningSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as amey-thakur/ai-skills/secrets-scanning.
Secrets scanning
A committed secret is compromised the moment it is pushed, and git history keeps it long after you delete the line. Scanning finds the leak; rotation is the only thing that closes it. Confuse the two, delete the line and move on, and you have left a working key in every clone.
Method
- Stop secrets before the commit lands. Install a pre-commit hook
(gitleaks protect, detect-secrets) so a key never reaches history at all. This is the only fully preventive control, and it is far cheaper than any cleanup after the push.
- Scan the whole history, not just the tip. Run
gitleaks detector
trufflehog across every commit and every branch. A secret rotated at HEAD is still live in the old commit a fork or a stale clone happily keeps.
- Gate CI on newly added secrets. Add a scanner step that fails the
pipeline when a pull request introduces a match. Feed it the provider rulesets (AWS, GCP, Stripe, Slack, private keys) plus high-entropy detection for the ones no rule names.
- Treat every hit as live and rotate first. The order does not change:
revoke the exposed credential at the provider, issue a replacement, deploy it, then remove the string. Deleting the commit without revoking leaves a valid key out there for anyone who already pulled.
- Do not mistake history rewriting for remediation.
git filter-repoor
BFG can scrub the secret from history, but assume it was harvested the second it landed. Rewriting is cleanup; rotation is the fix, and the two are not interchangeable.
- Tune false positives with a documented allowlist. Give example keys, test
fixtures, and public keys an allowlist entry with a reason, so the scanner keeps blocking real leaks instead of being switched off for crying wolf.
- Move rotated secrets into a manager. Store them in Vault, AWS Secrets
Manager, or the CI secret store and inject at runtime. A secret that exists only in the runtime environment cannot be committed by accident tomorrow.
Checks
- Does a fresh clone plus a full-history scan come back clean on every branch?
- When a key leaks, is it revoked at the provider inside the hour, not merely
deleted from the file?
- Are CI secrets injected at runtime, with none of them present in the repo or
the built image?
Boundaries
Scanning finds string-shaped secrets and misses credentials passed by other means; it also cannot judge whether a given match is truly sensitive. Storage and rotation mechanics overlap secrets-management, but detection and the rotate-on-hit response are this skill's job.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/security/secrets-scanning/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/amey-thakur/ai-skills/secrets-scanning)