/sota-skills:sota-secrets-managementfrom SOTA Engineering Skills
Guides implementing and auditing secrets management across the full credential lifecycle: generation, storage, injection, rotation, and leak detection. Supports BUILD (writing secure credential handling) and AUDIT (scanning repos for hardcoded or mishandled secrets) workflows.
Ships in SOTA Engineering Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Eliminate static secrets where possible; where not possible, make every secret short-lived, narrowly scoped, runtime-injected, auditable, and rotatable without downtime. This skill covers the full lifecycle (generation → distribution → storage → use → rotation → revocation → expiry), storage backends, application handling patterns, leak detection, incident remediation, and per-credential-type rules. It serves two workflows: BUILD (write correct secrets handling into new or existing code) and AUDIT (sweep a repo for secret issues and report findings).
The hierarchy of preference, always:
When you write or review code, push the design as far up this hierarchy as the platform allows, and document why if you stop below level 2.
Use when implementing anything that consumes or manages a credential.
rules/05-credential-types.md for the matching section before writing code.rules/01-lifecycle-and-workload-identity.md. Only fall back
to a stored secret when no federation path exists (e.g., third-party SaaS API key).rules/02-storage-backends.md. Never invent a custom encrypted store.rules/03-application-patterns.md..gitignore entries for
.env* and key files, log-scrubbing for the new secret's shape
(rules/04-detection-and-remediation.md).Coverage: every rules/ file's Audit checklist applies in AUDIT mode. Mark one not applicable only with its reason in the report — never skip a file because the thing it checks for is absent, since that absence may be the finding.
Use when asked to find secret leaks/misuse in an existing repo.
gitleaks dir --redact . and/or
trufflehog filesystem . over the working tree (gitleaks git reads commits only, so an
uncommitted file is out of its scope: measured 2026-11-21, gitleaks 8.30.1, git mode exit 0
and dir mode exit 1 on the same uncommitted key), and the history scan when the repo has
history: gitleaks git --redact --log-opts="--all --diff-merges=first-parent" ., since a merge's own diff is
otherwise never read (rules/04 §1). Treat tool
output as candidates, not verdicts — verify each hit.AKIA, ASIA, ghp_, gho_, ghs_, ghu_,
ghr_, github_pat_, xoxb-, xoxp-, sk-, sk_live_, rk_live_, AIza, ya29.,
glpat-, npm_, dop_v1_, shpat_, eyJhbGciOi (inline JWTs), -----BEGIN ([A-Z0-9]+ )*PRIVATE KEY( BLOCK)?----- (ERE; rules/04 §6 has the tested command).(password|passwd|pwd|secret|token|api[_-]?key|auth)\s*[:=]\s*['"][^'"]{6,}.://[^/:@\s]+:[^@\s]+@ (postgres, mysql, mongodb,
amqp, redis URLs)..env* tracked in git, *.pem, *.p12, *.pfx, *.key, *.jks, *.keystore,
id_rsa*, credentials.json, serviceaccount*.json, kubeconfig, .npmrc/.pypirc
with tokens, terraform.tfstate (state files contain plaintext secrets).git log --all -m -p / gitleaks git --log-opts="--all -m" for secrets removed
from HEAD (without -m, merge commits show no diff: rules/04 §1)
but live in history. A secret deleted in a later commit is still leaked — severity is
unchanged.ps),
Dockerfile ENV/ARG, docker-compose environment: literals, Kubernetes manifests with
stringData/base64 secrets committed, CI YAML with inline values, debug endpoints dumping
config, world-readable key files, missing rotation/expiry on long-lived tokens, overly broad
token scopes.| Severity | Definition | Examples |
|---|---|---|
| Critical | Valid (or must-assume-valid) secret exposed to anyone with repo/log access | Live cloud key in code or git history; DB password in a public image; private signing key committed |
| High | Secret exposed in a narrower channel, or handling that will leak under normal operation | Secret logged at info level; cred in CLI args; .env with real values tracked in private repo; token in URL; tfstate with secrets in VCS |
| Medium | Weak lifecycle or weak protection of an otherwise contained secret | No rotation for years; long-lived token where OIDC is available; overly broad scope; secret in env var where platform supports file mounts; world-readable key file; weak generation (low entropy) |
| Low | Hygiene gaps with no current exposure | Missing pre-commit/CI scanning; .env.example containing realistic-looking values; no .gitignore for key files; missing audit logging on secret access |
Confirmed-fake placeholders (changeme, xxx, <YOUR_KEY>, obvious test fixtures) are not
findings, but note them as Low if they are realistic enough to mask real leaks in scans.
Report every finding as:
[SEVERITY] path/to/file.py:123 — RULE-ID short title
Evidence: the offending line, with the secret value REDACTED (show prefix + length only)
Why: one sentence of impact
Fix: concrete remediation (rotate first, then remove; target pattern to adopt)
Effort: trivial | small | medium | large
Order findings Critical → Low. End the audit with: counts per severity, whether git history is
affected (if so, remediation must include rotation + history purge per
rules/04-detection-and-remediation.md), and the top 3 systemic fixes. Never reproduce a
discovered secret in full in your report — redact to first 4 chars + length.
| File | Read this when... |
|---|---|
rules/01-lifecycle-and-workload-identity.md | Generating secrets (entropy/length), setting rotation/expiry/revocation policy, replacing static secrets with OIDC federation, SPIFFE/SPIRE, cloud IAM roles, GitHub Actions OIDC |
rules/02-storage-backends.md | Choosing where a secret lives: Vault/OpenBao, AWS/GCP/Azure secret managers, SOPS+age, sealed-secrets/external-secrets in Kubernetes, env vars vs file mounts (no cross-deployment shared mounts), in-memory handling and zeroization, consumer-key end-to-end encryption (§8) |
rules/03-application-patterns.md | Writing app code that consumes secrets: config layering, runtime injection, caching/TTL, keeping secrets out of code/VCS/logs/errors/URLs/argv/crash dumps, per-env separation, least-privilege scoping, access audit logging; never-persist-raw (§2.1) — text whose producer you do not control is stored as a digest plus a structural skeleton, because shape redaction is an enumeration |
rules/04-detection-and-remediation.md | Setting up gitleaks/trufflehog, pre-commit hooks, CI gates; responding to a leak (rotate-first, purge history, assume compromised); honeytokens; running an AUDIT sweep; agent session transcripts as a credential store (§7) — inventorying and scoping the scan of ~/.claude/projects/**, and why a tool that sweeps it is a secret-processing tool |
rules/05-credential-types.md | Handling a specific credential class: DB creds, API keys, signing keys, TLS private keys, SSH keys, JWT secrets and kid rotation, data keys vs KMS envelope encryption, .env discipline |
.env files.kid, DB dual users). Unrotatable = misdesigned.ps output, Dockerfile layers, image env, shell history, or
telemetry. Scrub at the logger and wrap in redacting types.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
secrets-management, credential-security, secret-scanning, vault, sops, gitleaks
2 plugins ship this exact skill · first indexed Nov 26, 2026
43 skills in this plugin
/sotaMaster router for the SOTA engineering skills library. Use this skill whenever the user asks to build, design, implement, refactor, harden, optimize, review, or audit an application, service, or codebase and the request spans more than one domain — or when you are unsure which specific sota-* skill applies. Also use when working on a codebase you do not own: reviewing a pull request or diff, responding to code review, evaluating someone else's patch, or preparing an upstream contribution — including mid-session, once you are already reading source, a diff, or CI config. It maps the task (build or audit mode) to the right domain and language skills (Rust, Go, C/C++, JVM, Python, JS/TS, .NET/C#, PHP, Ruby, Swift). Trigger keywords: SOTA, best practices, audit my code, security review, compliance, hardening, prod readiness, code quality, pull request, PR review, review comment, maintainer feedback, patch, diff, upstream, contribute, merge request./sota-api-designState-of-the-art API design and audit guidance (2026) covering REST/HTTP, GraphQL, gRPC, WebSockets/SSE/realtime, webhooks, versioning/evolution, and API security/operations. Use when designing or building any API surface (endpoints, schemas, protos, realtime channels, webhook senders/receivers) AND when auditing/reviewing existing APIs for correctness, evolvability, security, and operational robustness. Not for browser UI, rendering, or client-framework concerns — use sota-web-frameworks or sota-frontend-design. Trigger keywords: API, REST, GraphQL, gRPC, endpoint, websocket, SSE, realtime, WebRTC, webhook, versioning, OpenAPI, pagination, idempotency, rate limit, problem+json, protobuf, deprecation.npx claudepluginhub martinholovsky/sota-skills --plugin sota-skillsOther plugins' skills for the same job