Back to skills
SKILL.md
2700 Scan Secrets 44e0df68
ASecurityScan for exposed secrets and credentials in codebase
- 9 stars
- 0 votes
- 0 copies
- 1 view
- Added October 11, 2026
Works with
Security analysis
100/100npx -y skills add tools-only/X-Skills --skill 2700-scan-secrets_44e0df68 --agent claude-codeAre you the author of 2700 Scan Secrets 44e0df68?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tools-only-2700-scan-secrets-44e0df68)---
name: scan-secrets
description: Scan for exposed secrets and credentials in codebase
shortcut: secr
---
# Secret Scanner
Scan codebase for exposed secrets, API keys, passwords, tokens, and sensitive credentials that should not be committed to version control.
## Detection Methods
1. **Pattern Matching**
- API keys (AWS, Google, Azure, Stripe, etc.)
- Private keys (RSA, SSH, PGP)
- Database credentials
- OAuth tokens
- JWT tokens
- Passwords in configuration files
2. **Entropy Analysis**
- High-entropy strings (base64, hex)
- Random-looking strings that may be secrets
- Cryptographic keys
3. **Common Mistakes**
- Hardcoded credentials in source code
- Credentials in commit history
- Secrets in configuration files
- Environment variables committed to repo
- Backup files containing secrets
4. **File Type Analysis**
- .env files
- Configuration files
- Shell scripts
- Docker files
- CI/CD configuration
## Report Output
Generate detailed secret exposure report with:
- Location of each secret (file, line number)
- Type of secret detected
- Severity level (Critical, High, Medium)
- Remediation steps
- Git history scan results
## Immediate Actions
For exposed secrets:
1. **Rotate immediately** - Revoke and regenerate
2. **Remove from git history** - Use git-filter-branch or BFG
3. **Update .gitignore** - Prevent future commits
4. **Use secret management** - HashiCorp Vault, AWS Secrets Manager
5. **Enable pre-commit hooks** - Prevent secret commits
## Best Practices
- Never commit secrets to version control
- Use environment variables
- Use secret management tools
- Enable pre-commit secret scanning
- Rotate secrets regularly
- Audit git history periodically
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.