project-template/.claude/skills/security/secret-rotation/SKILL.md
Validate secret storage practices and rotation policies. Check for secrets in code, Vault usage, and rotation schedules.
npx skillsauth add adrien-barret/claude-kit secret-rotationInstall 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.
You are a security engineer specializing in secrets management.
Search for these regex patterns across all source and config files:
| Pattern | Description |
|---------|-------------|
| AKIA[A-Z0-9]{16} | AWS Access Key ID |
| (?i)(aws_secret_access_key\|aws_secret)\s*[=:]\s*["']?[A-Za-z0-9/+=]{40} | AWS Secret Key |
| eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+ | JWT token |
| (?i)(password\|passwd\|secret\|token\|api_key\|apikey)\s*[=:]\s*["'][^"']{8,}["'] | Generic hardcoded secrets |
| -----BEGIN (RSA\|DSA\|EC\|OPENSSH) PRIVATE KEY----- | Private keys |
| (?i)(mongodb(\+srv)?:\/\/)[^\s"']+:[^\s"']+@ | Database connection string with credentials |
| ghp_[A-Za-z0-9]{36} | GitHub personal access token |
| sk-[A-Za-z0-9]{48} | OpenAI / Stripe secret key |
| xox[bpas]-[A-Za-z0-9-]+ | Slack token |
Also check:
.env files committed to the repository (should be in .gitignore).docker-compose.yml with hardcoded environment secrets..github/workflows/, .gitlab-ci.yml) with inline secrets instead of secret references.Note in the output: "This analysis covers the current codebase state. Secrets that were committed and later removed may still exist in git history. Consider running git log -p -S 'AKIA' or using tools like truffleHog or gitleaks to scan git history."
Check for usage of these secret managers:
| Manager | What to Look For |
|---------|-----------------|
| HashiCorp Vault | vault client config, vault_generic_secret in Terraform, Vault Agent templates |
| AWS Secrets Manager | aws_secretsmanager_secret, secretsmanager:GetSecretValue in IAM, SDK calls |
| AWS SSM Parameter Store | aws_ssm_parameter, ssm:GetParameter references |
| GCP Secret Manager | google_secret_manager_secret, Secret Manager API calls |
| Azure Key Vault | azurerm_key_vault_secret, Key Vault SDK references |
| Doppler | doppler.yaml, Doppler CLI references, DOPPLER_TOKEN |
| 1Password (Connect) | op:// references, 1Password Connect config |
For each manager found, verify:
*.Check for:
rotation_rules block)..env file with secrets not in .gitignore, secrets in CI config without secret store, no rotation policy for production secrets..env.example with placeholder values that look like real secrets, missing rotation for non-production environments.| Severity | Category | File:Line | Finding | Remediation |
|----------|----------|-----------|---------|-------------|
| Critical | Hardcoded Secret | src/config.py:12 | AWS access key AKIA... hardcoded | Move to AWS Secrets Manager; reference via IAM role |
| High | Missing Rotation | infra/secrets.tf:34 | Secret db-password has no rotation_rules | Add rotation Lambda with 30-day schedule |
End with:
.env.example files: these should contain only placeholder values (CHANGEME, xxx, your-key-here). Flag only if values look real..sops.yaml config exists and encryption is properly configured. Do not flag encrypted values.data-ai
Data-driven backlog prioritization using WSJF, RICE, value/effort matrix, and dependency analysis.
development
Build a traceability matrix from BMAD artifacts (problem.md, backlog.md, user-journey.md). Detects orphan tasks, orphan stories, and drift between task descriptions and story intent.
development
Generate unit and integration tests for project code. Use when new code is written or test coverage needs improvement.
testing
For each modified function, find or create its test, run it, and update it only if the function contract changed intentionally. Never silently adjust tests to make failures disappear.