mizazhaider-ceh/agentarsenal/secrets-in-code
Claude Code and agent skill by mizazhaider-ceh/agentarsenal
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use when finding and removing secrets from source code on
Install
npx vskill@latest install mizazhaider-ceh/agentarsenal/secrets-in-codeSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as mizazhaider-ceh/agentarsenal/secrets-in-code.
Secrets end up in code constantly: API keys in commits, tokens in config files, passwords in scripts. This skill covers the full response on codebases you are authorized to work on: finding them, measuring exposure, rotating, cleaning history, and stopping the next one. Assume any secret found in code is compromised until rotated.
Quick Workflow
- Scan the current tree with a secret scanner; triage every hit.
- Scan the full history: secrets live in old commits too.
- For each real secret: identify what it accesses and rotate it
immediately.
- Check for abuse: audit logs at the provider for the exposure
window.
- Remove from history where feasible (filter-repo), knowing
rotation matters more than purging.
- Move the secret to a proper store: vault, env, or secret
manager.
- Add pre commit hooks and CI scanning to prevent recurrence.
- Document the incident: what leaked, for how long, what was done.
1. Scanning
2. Rotation and cleanup
Edge cases
- The secret is in a public repo. It is compromised, period; rotate
now, investigate in parallel.
- Hundreds of historical hits. Prioritize live secrets (still
valid) over dead ones; rotate the live, purge what is practical.
- Test keys and placeholders trigger the scanner. Maintain an
allowlist so real hits stay visible.
Escalation
- Active abuse found in the audit log: engage incident response;
this is now a breach, not just hygiene.
- Secret belongs to a vendor or customer: notify them per contract
after rotating your side.
Detection and defender view
Secret scanning is detection for a hygiene problem: it finds what developers committed. Attackers find the same secrets with the same tools, which is why rotation speed matters more than perfect purging. The durable defense is making the right path easy: secret managers, short lived credentials, and scanners that block the commit before the secret ever lands.
Key references
- CWE-798 (Use of Hard-coded Credentials).
- CWE-312 (Cleartext Storage of Sensitive Information).
- Gitleaks documentation: rules and configuration.
Security
- Security scanPassed, 90 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/engineering/secrets-in-code/SKILL.md
Popularity
- 7-day trend score
- 0
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/mizazhaider-ceh/agentarsenal/secrets-in-code)