1mangesh1/dev-skills-collection/secret-scanner
Claude Code and agent skill by 1mangesh1/dev-skills-collection
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "scan for secrets", "find API keys", "detect credentials", "check for hardcoded passwords", "find leaked tokens", "scan for sensitive keys", "check git history for secrets", "audit repository for credentials", or mentions secret detection, credential scanning, API key exposure, token leakage, password detection, or security key auditing.
Install
npx vskill@latest install 1mangesh1/dev-skills-collection/secret-scannerSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Secret Scanner
A comprehensive secret detection skill for AI agents. Detects API keys, tokens, passwords, private keys, and credentials across 50+ services. Features entropy-based detection, git history scanning, and CI/CD integration.
Capabilities
- Secret Detection - Find hardcoded secrets using 200+ regex patterns
- Entropy Analysis - Detect high-entropy strings that may be secrets
- Provider Coverage - AWS, GCP, Azure, GitHub, Stripe, and 50+ more
- Git History Scan - Scan entire commit history for leaked secrets
- File Type Support - Code, configs, env files, JSON, YAML, and more
- Risk Scoring - Score findings by severity and exposure context
- False Positive Filtering - Smart exclusions for test data and examples
- Remediation Guidance - Step-by-step secret rotation instructions
- CI/CD Integration - Pre-commit hooks and GitHub Actions
- Allowlist Support - Configure known-safe patterns to skip
Usage
Commands
scan <path>- Scan files or directories for secretsscan-git <path>- Scan git history for leaked secretsaudit <path>- Full security audit with report generationverify <secret>- Check if a specific string matches secret patternsproviders- List all supported secret providersreport- Generate report from existing findings
Options
--format <type>- Output format: json, markdown, sarif (default: markdown)--output <file>- Write results to file--severity <level>- Minimum severity: low, medium, high, critical--include <patterns>- File patterns to include--exclude <patterns>- File patterns to exclude--entropy <threshold>- Entropy threshold (default: 4.5)--no-entropy- Disable entropy-based detection--allowlist <file>- Path to allowlist configuration--git-depth <n>- Number of commits to scan (default: all)
Workflow
When invoked, follow this workflow:
Step 1: Determine Scan Scope
Ask the user to specify:
- Target path (file, directory, or repository)
- Scan type (current files, git history, or both)
- Whether to include entropy-based detection
Step 2: File Discovery
Use Glob to find relevant files:
Step 3: Pattern Matching
Apply detection patterns from references/secret-patterns.md:
Critical Severity
High Severity
Step 4: Entropy Analysis
For strings not matching known patterns, calculate Shannon entropy:
Step 5: Context Analysis
For each potential secret:
- Check surrounding context (variable names, comments)
- Verify it's not in a test/example file
- Check against allowlist
- Determine exposure context (public repo, .env, etc.)
Step 6: Calculate Risk Score
Apply formula from references/risk-scoring.md:
Step 7: Generate Output
Format findings following examples/sample-finding.json:
Supported Providers
Cloud Providers
| Provider | Secret Types | Pattern Count | |
|---|---|---|---|
| AWS | Access Keys, Secret Keys, Session Tokens | 8 | |
| GCP | API Keys, Service Account Keys, OAuth | 6 | |
| Azure | Storage Keys, Connection Strings, SAS Tokens | 7 | |
| DigitalOcean | API Tokens, Spaces Keys | 3 | |
| Heroku | API Keys, OAuth Tokens | 2 | |
| Alibaba Cloud | Access Keys, Secret Keys | 3 |
Code Platforms
| Provider | Secret Types | Pattern Count | |
|---|---|---|---|
| GitHub | Personal Access Tokens, App Tokens, OAuth | 5 | |
| GitLab | Personal Tokens, Pipeline Tokens, Runner Tokens | 4 | |
| Bitbucket | App Passwords, OAuth, Repository Tokens | 3 | |
| npm | Auth Tokens, Publish Tokens | 2 | |
| PyPI | API Tokens | 1 |
Payment Services
| Provider | Secret Types | Pattern Count | |
|---|---|---|---|
| Stripe | Secret Keys, Publishable Keys, Restricted Keys | 4 | |
| PayPal | Client Secrets, Access Tokens | 2 | |
| Square | Access Tokens, Application IDs | 2 | |
| Braintree | Access Tokens, Merchant IDs | 2 |
Communication Services
| Provider | Secret Types | Pattern Count | |
|---|---|---|---|
| Twilio | Account SID, Auth Token, API Key | 4 | |
| SendGrid | API Keys | 2 | |
| Mailchimp | API Keys | 1 | |
| Slack | Bot Tokens, User Tokens, Webhooks | 4 | |
| Discord | Bot Tokens, Webhooks | 2 |
Database Services
| Provider | Secret Types | Pattern Count | |
|---|---|---|---|
| MongoDB | Connection Strings | 2 | |
| PostgreSQL | Connection Strings | 2 | |
| MySQL | Connection Strings | 2 | |
| Redis | Connection Strings, Auth Tokens | 2 |
Other Services
| Provider | Secret Types | Pattern Count | |
|---|---|---|---|
| OpenAI | API Keys | 2 | |
| Anthropic | API Keys | 1 | |
| Firebase | API Keys, Admin SDK Keys | 3 | |
| Cloudflare | API Keys, API Tokens | 2 | |
| Datadog | API Keys, App Keys | 2 | |
| New Relic | License Keys, API Keys | 2 | |
| Auth0 | Client Secrets, API Tokens | 2 | |
| Okta | API Tokens | 1 | |
| JWT | Tokens (signature analysis) | 1 |
Full pattern list: references/secret-patterns.md
Git History Scanning
Scan Modes
- Full History - Scan all commits
- Depth Limited - Scan last N commits
- Branch Specific - Scan specific branch
- Diff Mode - Only scan changed lines
Usage
Git-Specific Findings
Entropy-Based Detection
How It Works
- Extract string literals and values from files
- Calculate Shannon entropy for each string
- Flag high-entropy strings (> 4.5) that are:
- At least 20 characters long
- Contain mixed character classes
- In security-sensitive contexts
Entropy Thresholds
| Threshold | Detection Level | False Positive Rate | |
|---|---|---|---|
| 3.5 | Aggressive | High | |
| 4.0 | Moderate | Medium | |
| 4.5 | Balanced (default) | Low | |
| 5.0 | Conservative | Very Low |
Context Boosting
Entropy findings are boosted if found in:
- Variable names containing: key, secret, token, password, auth
- Files:
.env,secrets.*,credentials.* - Config sections:
[credentials],[auth]
False Positive Handling
Built-in Exclusions
- Test Files -
*_test.*,*_spec.*,test_*.*,__tests__/* - Example Files -
example.*,sample.*,demo.* - Documentation -
*.md,*.rst,docs/* - Mock Data - Files containing "mock", "fake", "dummy"
- Known Safe Patterns:
AKIAIOSFODNN7EXAMPLE(AWS example key)sk_test_*(Stripe test keys)pk_test_*(Stripe test publishable keys)xoxb-PLACEHOLDER-EXAMPLE-TOKEN(Slack example)
Allowlist Configuration
Create .secret-scanner-allowlist.yaml:
Risk Scoring
Severity Levels
| Score | Severity | Response | Examples | |
|---|---|---|---|---|
| 90-100 | Critical | Immediate | AWS keys, private keys, prod DB passwords | |
| 70-89 | High | Within 4 hours | API keys, OAuth tokens, service accounts | |
| 50-69 | Medium | Within 24 hours | Test API keys, internal tokens | |
| 25-49 | Low | Within 1 week | Entropy matches, partial credentials | |
| 0-24 | Info | Review | Possible false positives |
Factor Weights
- Sensitivity (40%): Type of secret and potential damage
- Exposure (30%): Where the secret was found
- Verifiability (15%): Can the secret be validated as real
- Scope (15%): Blast radius if exploited
Full methodology: references/risk-scoring.md
Remediation Workflow
Step 1: Immediate Actions
- Revoke the secret - Invalidate immediately in provider console
- Rotate credentials - Generate new secret
- Update applications - Deploy new credentials
- Audit access logs - Check for unauthorized usage
Step 2: Clean Up
- Remove from code - Delete the hardcoded secret
- Clean git history - Use BFG or git filter-branch
- Force push - Update all branches
- Invalidate caches - Clear CI/CD caches
Step 3: Prevention
- Add to .gitignore - Prevent future commits
- Install pre-commit hook - Block commits with secrets
- Use secrets manager - AWS Secrets Manager, HashiCorp Vault
- Environment variables - Store secrets in environment
Provider-specific instructions: references/remediation.md
CI/CD Integration
Pre-Commit Hook
Pre-commit Framework
GitHub Actions
Environment Variables
This is the start of the file. Read the full SKILL.md on GitHub.
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/secret-scanner/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 1 Apr 2026, 8 months ago.
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/1mangesh1/dev-skills-collection/secret-scanner)