Detect hardcoded credentials, API keys, tokens, and secrets in source code and configuration files. Use when reviewing code for leaked secrets before commit/merge, auditing a repository for credential exposure, or setting up secret detection.
68
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Detect hardcoded secrets by following the full procedure in plays/secrets-scan.md.
Run Automated Scanner — Use available tools in preference order:
trufflehog filesystem --directory=<path> --json (recommended)trufflehog git file://<repo> --json (includes git history)gitleaks detect --source=<path> --report-format=jsondetect-secrets scan <path> --all-filesManual Pattern Analysis — Search for high-confidence patterns:
AKIA...), OpenAI (sk-...), Anthropic (sk-ant-...), GitHub (ghp_...), Slack (xoxb-...), Stripe (sk_live_...), SendGrid (SG.)://user:pass@host).env, docker-compose*.yml, *.tfvars, terraform.tfstate, kubeconfig, .npmrc, .pypircContextual Analysis — For each detection: Is it real (not a placeholder/test fixture)? Is it active? What's the blast radius (service, permissions, prod vs dev, exposure duration)?
Check Preventive Controls — Verify: .gitignore covers sensitive files, pre-commit hooks for secret scanning, CI pipeline scanning, secrets management documentation.
Important: Never include actual secret values in findings. Show redacted versions only (e.g., AKIA****EXAMPLE). Active production secrets require immediate rotation.
Scan summary, findings using templates/finding.md, preventive controls checklist, and immediate rotation actions if needed.
79fea6b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.