Secret Scanner
Detect exposed API keys, passwords, tokens, and private keys in source code using pattern matching and entropy analysis, with remediation guidance for each finding.
Overview
scan your codebase for exposed secrets, API keys, passwords, and other sensitive credentials. It helps you identify and remediate potential security vulnerabilities before they are committed or deployed.
How It Works
- Initiate Scan: Claude activates the
secret-scanner plugin.
- Codebase Analysis: The plugin scans the codebase using pattern matching and entropy analysis.
- Report Generation: A detailed report is generated, highlighting identified secrets, their locations, and suggested remediation steps.
When to Use This Skill
This skill activates when you need to:
- Scan your codebase for exposed API keys (e.g., AWS, Google, Azure).
- Check for hardcoded passwords in configuration files.
- Identify potential private keys (SSH, PGP) accidentally committed to the repository.
- Proactively find secrets before committing changes.
Examples
Example 1: Identifying Exposed AWS Keys
User request: "Scan for AWS keys in the codebase"
The skill will:
- Activate the
secret-scanner plugin.
- Scan the codebase for patterns matching AWS Access Keys (AKIA[0-9A-Z]{16}).
- Generate a report listing any found keys, their file locations, and remediation steps (e.g., revoking the key).
Example 2: Checking for Hardcoded Passwords
User request: "Check for exposed credentials in config files"
The skill will:
- Activate the
secret-scanner plugin.
- Scan configuration files (e.g.,
database.yml, .env) for password patterns.
- Generate a report detailing any found passwords and suggesting the use of environment variables.
Best Practices
- Regular Scanning: Schedule regular scans to catch newly introduced secrets.
- Pre-Commit Hooks: Integrate the
secret-scanner into your pre-commit hooks to prevent committing secrets.
- Review Entropy Analysis: Carefully review results from entropy analysis, as they may indicate potential secrets not caught by pattern matching.
Integration
This skill can be integrated with other security tools, such as vulnerability scanners, to provide a comprehensive security assessment of your codebase. It can also be combined with notification plugins to alert you when new secrets are detected.
Prerequisites
- Access to codebase and configuration files in ${CLAUDE_SKILL_DIR}/
- Security scanning tools installed as needed
- Understanding of security standards and best practices
- Permissions for security analysis operations
Instructions
- Identify security scan scope and targets
- Configure scanning parameters and thresholds
- Execute security analysis systematically
- Analyze findings for vulnerabilities and compliance gaps
- Prioritize issues by severity and impact
- Generate detailed security report with remediation steps
Output
- Security scan results with vulnerability details
- Compliance status reports by standard
- Prioritized list of security issues by severity
- Remediation recommendations with code examples
- Executive summary for stakeholders
Error Handling
If security scanning fails:
- Verify tool installation and configuration
- Check file and directory permissions
- Validate scan target paths
- Review tool-specific error messages
- Ensure network access for dependency checks
Resources
- Security standard documentation (OWASP, CWE, CVE)
- Compliance framework guidelines (GDPR, HIPAA, PCI-DSS)
- Security scanning tool documentation
- Vulnerability remediation best practices
1---2name: scanning-for-secrets3description: Detect exposed secrets, API keys, and credentials in code. Use when auditing for secret leaks. Trigger with 'scan for secrets', 'find exposed keys', or 'check credentials'.4license: MIT5---6# Secret Scanner
7
8Detect exposed API keys, passwords, tokens, and private keys in source code using pattern matching and entropy analysis, with remediation guidance for each finding.
9
10## Overview
11
12scan your codebase for exposed secrets, API keys, passwords, and other sensitive credentials. It helps you identify and remediate potential security vulnerabilities before they are committed or deployed.
13
14## How It Works
15
161. **Initiate Scan**: Claude activates the `secret-scanner` plugin.
172. **Codebase Analysis**: The plugin scans the codebase using pattern matching and entropy analysis.
183. **Report Generation**: A detailed report is generated, highlighting identified secrets, their locations, and suggested remediation steps.
19
20## When to Use This Skill
21
22This skill activates when you need to:
23
24- Scan your codebase for exposed API keys (e.g., AWS, Google, Azure).
25- Check for hardcoded passwords in configuration files.
26- Identify potential private keys (SSH, PGP) accidentally committed to the repository.
27- Proactively find secrets before committing changes.
28
29## Examples
30
31### Example 1: Identifying Exposed AWS Keys
32
33User request: "Scan for AWS keys in the codebase"
34
35The skill will:
36
371. Activate the `secret-scanner` plugin.
382. Scan the codebase for patterns matching AWS Access Keys (AKIA[0-9A-Z]{16}).
393. Generate a report listing any found keys, their file locations, and remediation steps (e.g., revoking the key).
40
41### Example 2: Checking for Hardcoded Passwords
42
43User request: "Check for exposed credentials in config files"
44
45The skill will:
46
471. Activate the `secret-scanner` plugin.
482. Scan configuration files (e.g., `database.yml`, `.env`) for password patterns.
493. Generate a report detailing any found passwords and suggesting the use of environment variables.
50
51## Best Practices
52
53- **Regular Scanning**: Schedule regular scans to catch newly introduced secrets.
54- **Pre-Commit Hooks**: Integrate the `secret-scanner` into your pre-commit hooks to prevent committing secrets.
55- **Review Entropy Analysis**: Carefully review results from entropy analysis, as they may indicate potential secrets not caught by pattern matching.
56
57## Integration
58
59This skill can be integrated with other security tools, such as vulnerability scanners, to provide a comprehensive security assessment of your codebase. It can also be combined with notification plugins to alert you when new secrets are detected.
60
61## Prerequisites
62
63- Access to codebase and configuration files in ${CLAUDE_SKILL_DIR}/
64- Security scanning tools installed as needed
65- Understanding of security standards and best practices
66- Permissions for security analysis operations
67
68## Instructions
69
701. Identify security scan scope and targets
712. Configure scanning parameters and thresholds
723. Execute security analysis systematically
734. Analyze findings for vulnerabilities and compliance gaps
745. Prioritize issues by severity and impact
756. Generate detailed security report with remediation steps
76
77## Output
78
79- Security scan results with vulnerability details
80- Compliance status reports by standard
81- Prioritized list of security issues by severity
82- Remediation recommendations with code examples
83- Executive summary for stakeholders
84
85## Error Handling
86
87If security scanning fails:
88
89- Verify tool installation and configuration
90- Check file and directory permissions
91- Validate scan target paths
92- Review tool-specific error messages
93- Ensure network access for dependency checks
94
95## Resources
96
97- Security standard documentation (OWASP, CWE, CVE)
98- Compliance framework guidelines (GDPR, HIPAA, PCI-DSS)
99- Security scanning tool documentation
100- Vulnerability remediation best practices