agentleFS
abevzabevz/devops-skills/skills/secrets-management/SKILL.md

secrets-management

Skill0 starsChanged 41 days agoMITView on GitHub

Use when designing, deploying, or reviewing Kubernetes secrets management — External Secrets Operator, Sealed Secrets, SOPS, or Vault. Mention "external secrets", "ESO", "sealed secrets", "SOPS", "how do we manage secrets", "secret rotation" as triggers.

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use background-jobs, input-validation and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • YepAPISkill

    background-jobs

    Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

    Also in 3 projects that use this

  • hereshecodesSkill

    input-validation

    Use when processing user input, form data, file uploads, or query parameters

    Also in 3 projects that use this

  • mattpartidaSkill

    agent-security

    Review and harden OpenClaw/Hermes agent security, including tool permissions, elevated access, exec approvals, allowlists, sandboxing, browser and web exposure, prompt-injection risk, model risk, persistence, and personal-vs-shared trust boundaries. Use when the task is primarily about agent or runtime security rather than host firewall or OS hardening.

    Also in 3 projects that use this

  • harperaaSkill

    rate-limiting

    Implement rate limiting to prevent brute force attacks, spam, and resource abuse. Use this skill when you need to protect endpoints from automated attacks, prevent API abuse, limit request frequency, or control infrastructure costs. Triggers include "rate limiting", "rate limit", "brute force", "prevent spam", "API abuse", "resource exhaustion", "DoS", "withRateLimit", "too many requests", "429 error".

    Also in 3 projects that use this

  • jefflesterSkill

    api-security

    API security best practices and common vulnerability prevention. Enforces security checks for authentication, input validation, SQL injection, XSS, and OWASP Top 10 vulnerabilities. Use when building or modifying APIs.

    Also in 4 projects that use this

  • MicrosoftSkill

    authentication

    Wire this in whenever the app uses or connects to data — records, a database, entities, per-user data, row-level security — or when the user wants sign-in, accounts, login, or protected pages. Rayfin data is always accessed as an authenticated user, so **data implies auth**; only a static page over public data skips it. The starter ships as a no-auth "hello world" that previews with no backend, and the full Fabric auth scaffolding is already in the project — this skill wires it in: AuthProvider + bootstrapAuth in main.tsx, the route guard in App.tsx, the sign-in page, sign-out, and the env/deploy requirement. Triggers: auth, authentication, sign in, sign-in, login, log in, sign out, logout, account, user, identity, protect route, require login, gated page, data, database, records, per-user, row-level security, who is the current user, Fabric auth, Entra.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 31 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When workload identity is available, do not hide a long-lived credential inside Kubernetes merely to bootstrap a secret operator.

    line 22
  2. Distinctive:

    Follow the Workflow, Safety rules, and Quality checklist below.

    line 26
  3. Very specific:

    Use when choosing a Kubernetes secrets approach, deploying External Secrets Operator (or Sealed Secrets / SOPS / Vault), designing …

    line 36
  4. Distinctive:

    Never read, print, or exfiltrate actual secret values — work with references, keys, and metadata only.

    line 95
  5. Distinctive:

    Never propose storing a long-lived provider credential as a Kubernetes Secret when workload identity is available — call that out as the …

    line 99

“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Secrets Management

TL;DR checklist

  • Choose the source of truth: external manager, encrypted Git, or runtime mount.
  • Check provider authentication, secret scope, rotation, and consumer behavior.
  • Keep plaintext secret material out of Git and review the delivery path.

Key read-only checks

  • Inspect SecretStore/ExternalSecret or encrypted-file configuration and the workload reference; do not print secret values.

Common pitfalls

  • When workload identity is available, do not hide a long-lived credential inside Kubernetes merely to bootstrap a secret operator.

Agent procedure

Follow the Workflow, Safety rules, and Quality checklist below.

Quick references

  • references/eso-deployment.md

Last verified: unverified

When to use

Use when choosing a Kubernetes secrets approach, deploying External Secrets Operator (or Sealed Secrets / SOPS / Vault), designing ExternalSecret/ClusterSecretStore resources, planning rotation, or reviewing how secrets flow from a source of truth to running pods. Complements gitops-review (where secrets fit in the repo) and kubernetes-security (secret exposure at the pod).

Goal

Secrets never live in git as plaintext, come from a real source of truth, are rotatable, and are readable only by the workloads that need them — with the operator itself deployed so it can't become the weak link.

Workflow

  1. Choose the approach — the first decision, driven by where the source of truth is:

    ApproachSource of truthBest when
    External Secrets Operator (ESO)External manager (AWS/GCP/Azure SM, Vault, etc.)You already run a cloud/Vault secret store; want live sync + rotation
    Sealed SecretsGit (encrypted with a cluster key)No external manager; want fully git-native secrets
    SOPS (+ age/KMS)Git (encrypted files)GitOps-pure, per-file encryption, Flux/ArgoCD plugin decrypts at apply
    Vault Agent / Secrets Store CSIVault / cloud store, mounted at runtimeSecrets should never become k8s Secrets at all (mounted files/env only)

    ❌ committing a plaintext Secret manifest. ❌ mixing three approaches without a reason.

  2. Deploy the operator securely (if not running) — for ESO see references/eso-deployment.md: controller install, the provider-auth decision (workload identity vs static creds — the crux), ClusterSecretStore vs namespaced SecretStore, least-privilege on the store's credentials.
  3. Provider authentication — the security center of gravity. Prefer keyless workload identity (IRSA / GKE Workload Identity / AKS Workload Identity) over a static credential stored... as a Kubernetes Secret (the chicken-and-egg that undermines the whole point). Scope the store's access to only the secret paths it serves.
  4. ExternalSecret / consumption design — refreshInterval sane (not 1s hammering the provider, not 24h for something rotated hourly), data vs dataFrom (whole-secret pull), target template to shape the resulting Secret, and how pods consume it (mounted file > env var for high-value secrets, per kubernetes-security).
  5. Rotation — is rotation actually end-to-end? Provider rotates → ESO re-syncs on refresh → the pod must pick up the new value (env vars are read once at start; mounted secrets update but the app must re-read, or a reloader/rollout is needed). A rotation that stops at the Secret object and never reaches the running process is not rotation.
  6. Least access & audit — RBAC on who can read the synced Secrets; the provider's own audit log shows who/what pulled each secret; no wildcard secrets get (see kubernetes-security RBAC vectors).
  7. GitOps integration — ExternalSecret/ClusterSecretStore are plain manifests in git (they contain references, not values — safe to commit); ordering so the store exists before ExternalSecrets that use it; ArgoCD shows the generated Secret as OutOfSync unless excluded.

References

  • references/eso-deployment.md — ESO architecture and CRDs, Helm install, provider-auth patterns per cloud (IRSA/Workload Identity/Vault), SecretStore vs ClusterSecretStore, ExternalSecret/PushSecret spec, rotation and reloader wiring, GitOps ordering and ArgoCD exclusions, comparison with Sealed Secrets/SOPS, and troubleshooting.

For operating Vault itself (HA, seal/auto-unseal, auth methods, policies, secret engines, DR) rather than consuming its secrets into Kubernetes, use the vault skill.

Safety rules

  • Never read, print, or exfiltrate actual secret values — work with references, keys, and metadata only. If a task would require dumping a secret's value, stop and explain why not.
  • This skill designs/reviews and plans deployment: do not apply SecretStores/ExternalSecrets or create provider credentials against a live cluster/account — propose manifests.
  • Never propose storing a long-lived provider credential as a Kubernetes Secret when workload identity is available — call that out as the anti-pattern it is.
  • Provider auth config (roles, IRSA ARNs, Vault roles) is sensitive — reference, don't invent account IDs or paste real ARNs.

Output format

## Approach (chosen tool + why, vs alternatives)
## Provider auth (workload identity vs static — the decision)
## Store & ExternalSecret design
## Rotation path (source → Secret → running pod — end to end?)
## Least-access & audit
## GitOps wiring (ordering, ArgoCD exclusions)
## Gaps / risks

Quality checklist

  • Provider auth uses workload identity where available, not a static credential-in-Secret
  • Rotation was traced all the way to the running pod, not just the Secret object
  • The store's access is scoped to the secret paths it serves, no wildcards
  • ExternalSecrets/SecretStores in git contain references only, never values
  • No secret value was read or printed; nothing was applied to a live cluster

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.