secrets-manager
Secrets Manager
Overview
This skill governs the full lifecycle of secrets: keeping them out of source code, storing them in the right backend, injecting them at runtime, rotating them on schedule, and remediating leaks fast and completely. A leaked credential is an active incident — assume it is compromised the moment it touches a public surface.
Keywords: secret, credential, API key, token, password, .env, environment variable, vault, HashiCorp Vault, KMS, envelope encryption, AWS Secrets Manager, GCP Secret Manager, Azure Key Vault, SOPS, sealed-secrets, rotation, key rotation, git-secrets, gitleaks, trufflehog, pre-commit hook, scrub, BFG, git filter-repo, hardcoded credentials, dotenv, OIDC, workload identity, leaked key.
Workflow
-
Classify the request into one of four modes (see Decision Framework):
- PREVENT — keep new secrets out of code.
- STORE/INJECT — choose a backend and runtime delivery.
- ROTATE — establish rotation cadence and automation.
- REMEDIATE — a secret has already leaked.
-
If a secret may already be exposed, treat it as REMEDIATE first. Rotation/revocation precedes cleanup. Removing the secret from git does NOT un-leak it. Follow
references/leak-remediation.mdstep by step. -
Scan before you advise. Run
scripts/scan_secrets.pyover the repo (or recommendgitleaks/trufflehogfor git history). Never assume the codebase is clean. Report findings with file, line, and a redacted match — never echo full secret values into logs, chat, or commits.