Logo: Sota Secrets Management

Sota Secrets Management

Communautéit
martinholovsky
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; 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.

Iwwersiicht

Editeurmartinholovsky
RepositorySOTA-skills
Skill-Nummsota-secrets-management
Stären
28
Forks
3
Matgeliwwert Dateien
5
LizenzCC-BY-4.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 5 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    martinholovsky huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Sota Secrets Management an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/martinholovsky/SOTA-skills/tree/main/skills/sota-secrets-management
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/martinholovsky/SOTA-skills.git /tmp/SOTA-skills
mkdir -p .claude/skills
cp -r /tmp/SOTA-skills/skills/sota-secrets-management .claude/skills/sota-secrets-management
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Sota Secrets Management an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Sota Secrets Management automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Sota Secrets Management net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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 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. 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. 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.
  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).
  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 §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), 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.
  5. Verify and triage each finding: is the value real (test-shaped? placeholder? entropy?), is it currently valid, what blast radius. Never call a credential live by invoking it against production without explicit permission; judge from context.

Severity conventions

SeverityDefinitionExamples
CriticalValid (or must-assume-valid) secret exposed to anyone with repo/log accessLive cloud key in code or git history; DB password in a public image; private signing key committed
HighSecret exposed in a narrower channel, or handling that will leak under normal operationSecret logged at info level; cred in CLI args; .env with real values tracked in private repo; token in URL; tfstate with secrets in VCS
MediumWeak lifecycle or weak protection of an otherwise contained secretNo 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)
LowHygiene gaps with no current exposureMissing 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.

Finding format

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.

Rules index

FileRead this when...
rules/01-lifecycle-and-workload-identity.mdGenerating 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.mdChoosing 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.mdWriting 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.mdSetting 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.mdHandling 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

Top-10 non-negotiables

  1. A leaked secret is rotated first, scrubbed second. History rewriting without rotation is theater — assume every secret that ever touched git, logs, or a ticket is compromised.
  2. No secrets in source code or VCS, ever — including "temporarily," tests against real services, example files with live values, and committed .env files.
  3. Prefer no secret to a managed secret: if OIDC federation / IAM roles / SPIFFE can replace a static credential (CI→cloud, service→cloud, pod→service), use it. Static keys for cloud access from CI are a defect, not a choice.
  4. Every secret has an expiry or rotation interval and a documented zero-downtime rotation procedure (dual-secret overlap, JWT kid, DB dual users). Unrotatable = misdesigned.
  5. Generate secrets with a CSPRNG, ≥256 bits of entropy for opaque tokens (≥32 random bytes before encoding); never derive from timestamps, UUIDv4-as-secret, or human-chosen strings.
  6. Secrets never appear in: logs, error messages, exception payloads, crash dumps, URLs or query strings, CLI arguments, ps output, Dockerfile layers, image env, shell history, or telemetry. Scrub at the logger and wrap in redacting types.
  7. Inject at runtime, never at build time. Images, artifacts, and bundles are secret-free; the platform (orchestrator, secret-manager SDK, CSI driver) supplies values when the process starts — file mounts preferred over env vars where supported.
  8. Least privilege and per-environment separation: one credential per consumer per environment, scoped to the minimum actions/resources; dev/staging/prod never share secrets and prod values are unreadable from non-prod.
  9. Application data encryption uses KMS envelope encryption (encrypt data with a data key, wrap the data key with a KMS key); never hardcode or hand-manage raw encryption keys.
  10. Scanning is mandatory and layered: pre-commit (gitleaks/trufflehog) on every developer machine, a blocking CI gate, and periodic full-history scans. Detection without a leak runbook is incomplete — keep the rotate→revoke→purge→monitor runbook current.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-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; 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 Manag...

Firwat Sota Secrets Management op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Sota Secrets Management besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Sota Secrets Management an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/martinholovsky/SOTA-skills/tree/main/skills/sota-secrets-management an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Sota Secrets Management benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Sota Secrets Management benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Sota Secrets Management domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Sota Secrets Management gratis?

Jo. martinholovsky huet de Skill ënner der Lizenz CC-BY-4.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇