/secrets-management:secrets-audit [--history] [--verify] [--fix]from secrets-management
Scans a project for hardcoded secrets, exposed credentials, and secret-handling anti-patterns across code, config, CI/CD, and container files. Supports --history, --verify, and --fix flags.
Ships in secrets-management. Installing the plugin adds it to Claude Code.
Scan a project for hardcoded secrets, exposed credentials, and secret management anti-patterns.
Use when you need to find leaked secrets in a codebase. Appropriate for:
The command operates on the current project directory. It examines:
Optional flags:
--history -- include full git history scan (slower, more thorough)--verify -- attempt to verify if detected secrets are still valid (requires network access)--fix -- generate .gitignore updates and pre-commit hook configurationRepository Analysis: Identify the tech stack, frameworks, and cloud providers in use. This determines which secret patterns to prioritize (AWS keys for AWS projects, database strings for backend services, etc.).
Current Tree Scan: Scan all files in the current working tree for secret patterns:
secret, password, token, key, credential)Git History Scan (with --history): Scan the full git history for:
Anti-Pattern Detection: Check for common secret management anti-patterns:
.env files committed to the repositoryenvironment section (not using docker secrets)Verification (with --verify): For detected secrets that match known API formats, attempt to verify if the credential is still active. Report verification status.
Severity Classification:
Remediation Generation: For each finding, provide specific remediation steps including revocation instructions, rotation procedures, and preventive measures.
# Secrets Audit Report
Generated: [timestamp]
Project: [name]
## Summary
| Severity | Count |
|----------|-------|
| Critical (verified live) | X |
| High (likely valid) | X |
| Medium (possible) | X |
| Low (test/expired) | X |
| Info (anti-patterns) | X |
## Critical Findings
[Details with masked secrets, file locations, commit SHAs, remediation]
## High Findings
[Details with masked secrets, file locations, remediation]
## Anti-Patterns Detected
- [ ] .env file committed to repository
- [ ] Secrets in CI/CD YAML without platform secrets
- [ ] Docker build args with credentials
- [ ] No pre-commit secret scanning configured
- [ ] No .gitignore entries for secret files
## Remediation Plan
1. [Immediate: Revoke live credentials]
2. [Short-term: Rotate all potentially exposed credentials]
3. [Medium-term: Implement vault for secret storage]
4. [Long-term: Configure pre-commit hooks and CI scanning]
## Prevention Recommendations
- Pre-commit hook: [gitleaks configuration]
- CI/CD scanning: [pipeline integration]
- .gitignore additions: [entries to add]
What the command file sets; muted values are Claude Code's defaults
secrets-scanning, credential-leak, security-audit, git-history
7-day visitors to each command page
2 commands in this plugin
npx claudepluginhub ormus-solutions/libresecops-claude-code --plugin secrets-management