skills/secret-management-expert/SKILL.md
Secret lifecycle management with Vault, AWS Secrets Manager, and rotation automation. Activate on: secret management, HashiCorp Vault, AWS Secrets Manager, secret rotation, SOPS, sealed secrets, credential management, API key storage, least privilege. NOT for: application auth flows (use oauth-oidc-implementer), network security (use security-auditor), encryption at rest (use devops-automator).
npx skillsauth add curiositech/windags-skills secret-management-expertInstall 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.
Expert in secret lifecycle management — storage, rotation, injection, and audit — across cloud and self-hosted infrastructure.
Activate on: "secret management", "Vault setup", "AWS Secrets Manager", "secret rotation", "SOPS encryption", "sealed secrets", "credential storage", "API key management", "least privilege secrets"
NOT for: Application auth flows → oauth-oidc-implementer | Network security → security-auditor | Encryption at rest → devops-automator
| Domain | Technologies | |--------|-------------| | Secret Stores | HashiCorp Vault 1.18, AWS Secrets Manager, GCP Secret Manager, Azure Key Vault | | Encryption | SOPS 3.9, age, AWS KMS, GCP Cloud KMS, sealed-secrets | | K8s Integration | External Secrets Operator, Vault CSI Provider, Sealed Secrets controller | | Rotation | Vault dynamic secrets, AWS Lambda rotation, custom rotation functions | | Audit | Vault audit log, CloudTrail, access anomaly detection |
# ExternalSecret pulls from AWS Secrets Manager into K8s Secret
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: database-credentials
spec:
refreshInterval: 1h
secretStoreRef:
name: aws-secrets-manager
kind: ClusterSecretStore
target:
name: db-credentials # K8s Secret name
creationPolicy: Owner
data:
- secretKey: DB_PASSWORD
remoteRef:
key: prod/database/postgres
property: password
- secretKey: DB_USERNAME
remoteRef:
key: prod/database/postgres
property: username
App requests credential → Vault generates ephemeral DB credential
├─ Credential has TTL (e.g., 1 hour)
├─ Vault creates DB user with scoped permissions
├─ App uses credential until near expiry
├─ Vault Agent auto-renews or rotates
└─ On expiry: Vault revokes DB user automatically
Result: No long-lived credentials exist. Every credential is:
- Unique to the requester
- Time-bounded
- Automatically revoked
- Fully audited
# Encrypt secrets file with age key (developer workflow)
sops --encrypt --age age1... secrets.yaml > secrets.enc.yaml
# Decrypt in CI/CD pipeline
export SOPS_AGE_KEY=$(vault kv get -field=age-key secret/ci/sops)
sops --decrypt secrets.enc.yaml > secrets.yaml
# .sops.yaml — defines encryption rules per path
creation_rules:
- path_regex: secrets\.yaml$
age: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
- path_regex: \.env\..*$
age: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
ARG and ENV persist in image layers. Use runtime injection via sidecar, CSI driver, or entrypoint script..env.example with placeholder values that get real values committed. Use SOPS, sealed-secrets, or External Secrets Operator. Add .env* to .gitignore.[ ] All secrets stored in a dedicated secret store (not config files)
[ ] No secrets in Docker image layers, Git history, or CI logs
[ ] Automated rotation enabled for database credentials
[ ] Secret access logged and auditable (Vault audit, CloudTrail)
[ ] Least privilege: each service has scoped access to only its secrets
[ ] SOPS or sealed-secrets used for any secrets committed to Git
[ ] Dynamic secrets preferred over static credentials
[ ] Secret TTLs set — no indefinite credentials
[ ] Emergency revocation procedure documented and tested
[ ] CI/CD uses short-lived tokens (OIDC federation), not long-lived keys
[ ] Developers cannot access production secrets from local machines
[ ] Secret sprawl inventory maintained and reviewed quarterly
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.