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- Scan your codebase for exposed API keys (e.g., AWS, Google, Azure).
24- Check for hardcoded passwords in configuration files.
25- Identify potential private keys (SSH, PGP) accidentally committed to the repository.
26- Proactively find secrets before committing changes.
27
28## Examples
29
30### Example 1: Identifying Exposed AWS Keys
31
32User request: "Scan for AWS keys in the codebase"
33
34The skill will:
351. Activate the `secret-scanner` plugin.
362. Scan the codebase for patterns matching AWS Access Keys (AKIA[0-9A-Z]{16}).
373. Generate a report listing any found keys, their file locations, and remediation steps (e.g., revoking the key).
38
39### Example 2: Checking for Hardcoded Passwords
40
41User request: "Check for exposed credentials in config files"
42
43The skill will:
441. Activate the `secret-scanner` plugin.
452. Scan configuration files (e.g., `database.yml`, `.env`) for password patterns.
463. Generate a report detailing any found passwords and suggesting the use of environment variables.
47
48## Best Practices
49
50- **Regular Scanning**: Schedule regular scans to catch newly introduced secrets.
51- **Pre-Commit Hooks**: Integrate the `secret-scanner` into your pre-commit hooks to prevent committing secrets.
52- **Review Entropy Analysis**: Carefully review results from entropy analysis, as they may indicate potential secrets not caught by pattern matching.
53
54## Integration
55
56This 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.
57
58## Prerequisites
59
60- Access to codebase and configuration files in ${CLAUDE_SKILL_DIR}/
61- Security scanning tools installed as needed
62- Understanding of security standards and best practices
63- Permissions for security analysis operations
64
65## Instructions
66
671. Identify security scan scope and targets
682. Configure scanning parameters and thresholds
693. Execute security analysis systematically
704. Analyze findings for vulnerabilities and compliance gaps
715. Prioritize issues by severity and impact
726. Generate detailed security report with remediation steps
73
74## Output
75
76- Security scan results with vulnerability details
77- Compliance status reports by standard
78- Prioritized list of security issues by severity
79- Remediation recommendations with code examples
80- Executive summary for stakeholders
81
82## Error Handling
83
84If security scanning fails:
85- Verify tool installation and configuration
86- Check file and directory permissions
87- Validate scan target paths
88- Review tool-specific error messages
89- Ensure network access for dependency checks
90
91## Resources
92
93- Security standard documentation (OWASP, CWE, CVE)
94- Compliance framework guidelines (GDPR, HIPAA, PCI-DSS)
95- Security scanning tool documentation
96- Vulnerability remediation best practices