Plan secrets management
Plans secrets management for a stack, covering inventory, storage, runtime injection, rotation, access control and leak detection. Use when secrets live in env files, CI variables and chat.
Most leaked credentials are long-lived keys copied into env files, CI variables, container images, logs and chat, shared by many services and never rotated because nobody knows what would break. The strongest move is to need fewer secrets at all: workload identity and short-lived credentials issued by the platform (cloud IAM roles for workloads, OIDC federation from CI to the cloud) replace static keys. What remains belongs in one managed store, is injected at runtime with least privilege, has an owner and a rotation path, and is scanned for in code and logs.
Plan secrets management for:
- Current state. Summarise where secrets live today and the main risks (shared keys, no rotation, secrets in git history or images, broad CI access). If the input does not say, list what to find out.
- Target design.
- Eliminate first: list which secrets can be replaced by workload identity, OIDC federation from CI, managed database IAM authentication or short-lived tokens, using the platform's native mechanism.
- Store: recommend one secrets store that fits the stack (the cloud provider's secret manager, HashiCorp Vault or OpenBao, or sealed or encrypted files with SOPS for small GitOps setups) and say why; name the trade-off you are accepting.
- Inject: how secrets reach workloads at runtime (Kubernetes External Secrets or CSI driver, platform-native references, fetching at start-up), never baked into images or committed. Prefer files or in-memory over environment variables where the stack allows, and say why.
- Local development: how developers get non-production secrets without copying production ones.
- Inventory. A table template plus the rows you can fill from the input: secret, purpose, owner, environments, consumers, store path, rotation method and frequency, blast radius if leaked.
- Rotation. Per secret type (database passwords, API keys for third parties, signing keys, TLS certificates, encryption keys): automated or manual, frequency, a dual-secret or overlap window so rotation causes no downtime, and the emergency rotation runbook outline.
- Access control. Least privilege per workload and per environment, separate production access, break-glass access with logging, audit logs on read, and who can create or read which paths.
- Leak detection. Pre-commit and CI secret scanning, the repository host's push protection, scanning container images and logs, log redaction, and the alert-to-rotation path when something is found.
- Migration plan. Ordered phases starting with the highest blast radius secrets, each with the steps, the verification, and how to roll back.
- Never ask for or repeat actual secret values. If the input contains any, say they must be treated as leaked and rotated, and refer to them by name only.
- Recommend tools by capability first and product second; do not invent product features. When unsure, say "check the documentation".
- Scale the plan to the team: a three-person startup does not need a self-hosted Vault cluster.
- Do not claim compliance with a standard; say which controls support it.
- Separate what you verified from what you inferred. Mark inferences as such.
- When you do not know, say "I don't know" once and state what would settle it.
Current state
Bullets of findings and risks.
Target design
Subsections: Eliminate, Store, Inject, Local development. Include a short config or diagram sketch where it helps.
Secret inventory
A table.
Rotation
A table by secret type: method, frequency, overlap approach.
Access control
Bullets.
Leak detection
Bullets, with where each check runs.
Migration plan
Numbered phases with verification and rollback.
Open questions
Numbered.
1 required value still a placeholder; the assistant will ask for it.
details
- kind
- Prompt: a task you run by name to get one finished thing back
- domain
- Software engineering
- category
- Security
- level
- Intermediate
- made for
- DevOps / platform engineer, Security engineer, Site reliability engineer, Tech lead / staff engineer
- risk
- read-only
- version
- v1.0.0 · incubating
- reviewed
- 2026-10-03
- works in
- Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md, ChatGPT, claude.ai
use in
npx @hermes-hq/hodios install plan-secrets-management --target claude-codenpx skills add hermes-hq/hodios-dist --skill plan-secrets-management -a claude-codeclaude plugin marketplace add hermes-hq/hodios-distclaude plugin install hodios-software-engineering@hodiosThe plugin brings every entry in this domain at once.
pairs well with
All of SecuritySecurity auditor
Reviews code for exploitable weaknesses and reports only issues with a concrete attack path. Use as a reviewer persona or subagent for security-sensitive changes.
security-auditorDevOps engineer
Acts as a DevOps engineer who automates the second time, keeps pipelines fast and reproducible, and makes every change reversible. Use for CI/CD, infrastructure and release work.
devops-engineerRespond to a leaked secret
Produces an ordered response plan for an exposed key, token or password - revoke and rotate, audit use, clean up copies, notify and prevent. Use right after a secret is committed, logged or shared.
respond-to-leaked-secretReview a cloud IAM policy
Reviews AWS, GCP or Azure IAM policies for over-broad permissions, privilege-escalation paths, wildcard resources and missing conditions, and proposes least-privilege versions.
review-cloud-iam-policyHarden web app headers and cookies
Produces hardened HTTP security headers, a Content Security Policy, CORS and cookie settings for a web app, rolled out first in report-only mode. Use before launch or after a security scan.
harden-web-app-configReview an API against the OWASP API Top 10
Reviews an API design or implementation against the OWASP API Security Top 10, from object-level authorization and mass assignment to rate limits and SSRF, with attack paths and fixes.
review-api-security