plugins/security-audit/skills/detecting-secrets/SKILL.md
Detect hardcoded secrets, API keys, tokens, and credentials in code and git history. Use when auditing for leaked secrets or before publishing code.
npx skillsauth add qte77/claude-code-utils-plugin detecting-secretsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scope: $ARGUMENTS
AKIA[0-9A-Z]{16})[0-9a-zA-Z/+]{40} near AWS context)"type": "service_account")AIza[0-9A-Za-z_-]{35})DefaultEndpointsProtocol=)ghp_, gho_, ghu_, ghs_, ghr_)glpat-)xoxb-, xoxp-, xoxs-)sk_live_, pk_live_, rk_live_)api[_-]?key, apikey, api[_-]?secret)-----BEGIN RSA PRIVATE KEY-----)-----BEGIN EC PRIVATE KEY-----)-----BEGIN OPENSSH PRIVATE KEY-----)-----BEGIN PGP PRIVATE KEY BLOCK-----)-----BEGIN PRIVATE KEY-----)password\s*=\s*["'][^"']+["'])://user:pass@).env files with secrets committed to repo.netrc / .pgpass / .my.cnf with credentialsjwt.sign, JWT_SECRET)SESSION_SECRET, SECRET_KEY)Prioritize scanning these locations:
.env, .env.* (should be gitignored)config/, settings/, secrets/docker-compose*.yml (environment sections)*.tfvars, terraform.tfstate.github/workflows/, .gitlab-ci.yml)Dockerfile (ENV and ARG with secrets)Check for secrets in past commits:
.env files added then removed.gitignore covers sensitive file patternsNote: Secrets in git history remain accessible even after removal from HEAD. If found, the secret must be rotated regardless.
| # | Type | Severity | File:Line | Pattern Match | Remediation |
|---|------|----------|-----------|---------------|-------------|
| 1 | AWS Key | Critical | .env:3 | AKIA... | Rotate in IAM, add to .gitignore |
| 2 | Private Key | Critical | certs/key.pem | RSA key | Remove, regenerate, gitignore |
| 3 | DB Password | High | config/db.yml:12 | password: hunter2 | Move to env var |
| 4 | JWT Secret | High | src/auth.js:8 | SECRET = "..." | Move to env var |
For every confirmed secret:
.gitignore and pre-commit hooksdevelopment
Verify an external or AI-generated security report against the actual codebase before acting on it. Use when handed a scanner PDF, automated teardown, audit report, or bug-bounty submission — classifies every finding CONFIRMED / OVERSTATED / FALSE-POSITIVE / FABRICATED and salvages the real work items.
development
Audits a site's SEO and AI-search (GEO) readiness — meta tags, Open Graph/Twitter, JSON-LD, robots/llms conventions — and generates fixes. Use when reviewing search visibility, social previews, structured data, or LLM/AI-crawler discoverability.
development
Analyzes industry websites for design patterns, layout, typography, and content strategies using first-principles thinking. Use when researching website design, UI patterns, or competitive design analysis.
development
Audits website usability for UX optimization, covering forms, navigation, validation, and microcopy. Use when reviewing user experience, task completion flows, or interface friction points.