Skip to content
Development
Skill

/sota-secrets-management

State-of-the-art secrets management for building and auditing software. Use whenever a task involves creating, storing, injecting, rotating, or scanning for credentials — or reviewing code/infrastructure for secret leaks and misuse. BUILD mode: implementing secrets handling;

From plugin
sota-skills
2843 skills5 commands4 hooks2 MCP

Claude Code

$ npx -y skills add martinholovsky/SOTA-skills --skill sota-secrets-management --agent claude-code

SKILL.md

sota-secrets-management.SKILL.md
name: sota-secrets-management
description: >-
  State-of-the-art secrets management for building and auditing software. Use
  whenever a task involves creating, storing, injecting, rotating, or scanning
  for credentials — or reviewing code/infrastructure for secret leaks and
  misuse. BUILD mode: implementing secrets handling; AUDIT mode: sweeping a
  repo for leaked, hardcoded, or mishandled secrets. Trigger keywords: secret,
  secrets management, credential, API key, token, password, private key,
  signing key, JWT secret, TLS key, SSH key, database password, connection
  string, .env, dotenv, environment variable, Vault, OpenBao, AWS Secrets
  Manager, GCP Secret Manager, Azure Key Vault, KMS, envelope encryption,
  SOPS, age, sealed-secrets, external-secrets, workload identity, OIDC
  federation, SPIFFE, SPIRE, IAM role, GitHub Actions OIDC, short-lived
  credential, rotation, revocation, key expiry, gitleaks, trufflehog, secret
  scanning, leaked key, hardcoded secret, committed secret, git history purge,
  honeytoken, pre-commit hook, kid rotation.

SOTA Secrets Management

Purpose

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:

1. **No secret at all** — workload identity / OIDC federation / cloud IAM roles. 2. **Short-lived, auto-issued secret** — Vault dynamic creds, STS tokens, SPIRE SVIDs. 3. **Long-lived secret in a managed backend** — secret manager + rotation + audit log. 4. **Encrypted secret in the repo** — SOPS+age / sealed-secrets, GitOps only. 5. **Plaintext secret anywhere** — never acceptable.

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.

BUILD mode

Use when implementing anything that consumes or manages a credential.

1. **Classify the credential.** Type (DB cred, API key, signing key, TLS key, …) determines the rules — read [`rules/05-credential-types.md`](rules/05-credential-types.md) for the matching section before writing code. 2. **Try to eliminate it.** Cloud-to-cloud or CI-to-cloud calls should use workload identity (OIDC, IAM roles, SPIFFE) — see [`rules/01-lifecycle-and-workload-identity.md`](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). 3. **Pick the storage backend** per environment using the decision table in [`rules/02-storage-backends.md`](rules/02-storage-backends.md). Never invent a custom encrypted store. 4. **Wire injection at runtime** — file mount or env var populated by the platform, fetched via SDK with caching/TTL, never baked into images or code. Patterns and good/bad pairs in [`rules/03-application-patterns.md`](rules/03-application-patterns.md). 5. **Design rotation before shipping.** Every secret needs: an owner, a rotation procedure that works with zero downtime (dual-secret / kid overlap), an expiry or rotation interval, and a revocation path. If you cannot answer "how do we rotate this at 3am during an incident," the design is not done. 6. **Add guardrails:** pre-commit scanning config, CI secret-scan gate, `.gitignore` entries for `.env*` and key files, log-scrubbing for the new secret's shape ([`rules/04-detection-and-remediation.md`](rules/04-detection-and-remediation.md)). 7. **Self-review against the Audit checklist** at the end of every rules file you used.

AUDIT mode

**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.

Sweep procedure

1. **Tooling pass (absent? ask the operator to install it, router principle 6):** run `gitleaks git --redact .` and/or `trufflehog filesystem .` (and `git log` history scan when the repo has history). Treat tool output as candidates, not verdicts — verify each hit. 2. **Manual grep pass** for what tools miss. Sweep at minimum:

  • High-entropy strings and known prefixes: `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](rules/04-detection-and-remediation.md) §6 has the tested command).

  • Assignment patterns: `(password|passwd|pwd|secret|token|api[_-]?key|auth)\s*[:=]\s*['"][^'"]{6,}`.
  • Connection strings with embedded creds: `://[^/:@\s]+:[^@\s]+@` (postgres, mysql, mongodb,

amqp, redis URLs).

  • Files: `.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). 3. **History pass:** `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. 4. **Handling pass (misuse, not just leaks):** secrets in log statements, error messages, exception payloads, crash/telemetry dumps, URLs/query strings, CLI args (visible in `ps`),

Read more
@martinholovsky
Ships withsota-skills

Make your AI coding assistant build and audit like your most senior engineer. Your assistant is brilliant — it just doesn't know your standards, and it forgets the ones it does know as the task grows long.

2843 skills2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
28
Star history of martinholovsky/SOTA-skills on GitHub, a chart by star-history.com

Other skills on sota-skills.

sota-c-cpp

sota-c-cpp

State-of-the-art C and C++ engineering rules that Claude applies when writing or auditing C/C++. Covers modern idioms (RAII,…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about sota-secrets-management.

Which coding agents can use sota-secrets-management?
sota-secrets-management installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.