agentleFS
JaydipGabaniJaydipGabani/agentkit/skills/distributed-systems-security-hardening/SKILL.md

distributed-systems-security-hardening

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Harden distributed-systems changes for security, CI, RBAC, dependencies, credentials, supply chain, feature-gate / version rollout, certificate rotation, and compatibility safety. Use when changing GitHub Actions, dependencies, base images, RBAC, credentials, webhook behavior, or any feature that needs safe defaults and operator-facing rollout protections.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    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:

    Use this skill when hardening a change in any distributed-systems project (Gatekeeper, Kubernetes, cert-controller, frameworks/constraint, …

    line 9
  2. Distinctive:

    Prefer boring, auditable mechanisms over custom cleverness.

    line 28
  3. Distinctive:

    Use secure defaults; require explicit opt-in for risky behavior.

    line 31
  4. Distinctive:

    Avoid logging sensitive data (tokens, secrets, full request bodies, certificate keys).

    line 32
  5. Distinctive:

    Keep last-known-good behavior on reload or config failure when appropriate.

    line 33
  6. Very specific:

    Prefer graceful shutdown over time.Sleep polling loops.

    line 38
  7. Distinctive:

    Avoid silent failure in paths that affect correctness or rollout safety.

    line 40
  8. Distinctive:

    Avoid unnecessary admission/hot-path latency.

    line 49
  9. Distinctive:

    Treat CI configuration as production code.

    line 65
  10. Distinctive:

    Do not trade away least privilege for convenience.

    line 66
  11. Distinctive:

    Prefer explicit rollback and rollout notes when behavior changes could affect cluster operators.

    line 67

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “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

Distributed-Systems Security & Rollout Hardening (shared workflow)

Use this skill when hardening a change in any distributed-systems project (Gatekeeper, Kubernetes, cert-controller, frameworks/constraint, secrets-store-csi, etc.). Treat CI, dependencies, credentials, RBAC, certificates, and rollout behavior as production attack surface.

This is the shared workflow. Repo-scoped skills add project-specific anchors on top.

Hardening Workflow

  1. Inventory the exposed surface:
    • GitHub Actions and workflow permissions
    • container images and build inputs
    • RBAC, service accounts, and admission permissions
    • secrets, certificates, and credentials
    • external calls, retries, caches, and config reload paths
    • feature gates, version gates, compatibility boundaries, and rollout conditions
  2. Harden the supply chain:
    • Pin third-party GitHub Actions to a SHA, not a tag.
    • Pin container images by digest where practical.
    • Tie dependency bumps to a compatibility or CVE reason.
    • Constrain workflow permissions: to least privilege.
    • Prefer boring, auditable mechanisms over custom cleverness.
  3. Harden runtime behavior:
    • Use secure defaults; require explicit opt-in for risky behavior.
    • Avoid logging sensitive data (tokens, secrets, full request bodies, certificate keys).
    • Keep last-known-good behavior on reload or config failure when appropriate.
    • Emit warnings/events for unsafe modes so operators can detect them.
  4. Harden lifecycle behavior:
    • Propagate real context.Context; never use context.TODO() in changed paths.
    • Prefer graceful shutdown over time.Sleep polling loops.
    • Preserve ownership and retry behavior on cleanup paths.
    • Avoid silent failure in paths that affect correctness or rollout safety.
    • Lock scope: walk every operation inside Lock()/Unlock() and verify shared reads share the lock.
  5. Add observability with the feature:
    • metrics for reload, retries, unsafe modes, and failure states
    • logs and events with resource identifiers and actionable context
    • dashboards/alerts updates if the metric is operator-critical
  6. Protect performance and compatibility while hardening:
    • Avoid unnecessary admission/hot-path latency.
    • Bound caches explicitly; design invalidation and retry before adding cache state.
    • Account for feature-gate / version-gate disablement, skew, and downgrade.
    • Preserve API/wire compatibility unless explicitly versioned and documented.
  7. Validate the change and summarize residual risk. Name the threat model class (supply chain, runtime escape, credential exfiltration, denial-of-service, skew/downgrade) and how the change closes or constrains it.

Output Format

Provide one of these:

  1. Hardening patch — concrete diffs with a one-line rationale per change.
  2. Review report — risks (with severity), required fixes, residual concerns.

Rules

  • Treat CI configuration as production code.
  • Do not trade away least privilege for convenience.
  • Prefer explicit rollback and rollout notes when behavior changes could affect cluster operators.
  • Security boundaries are part of correctness, not a follow-up task.

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.