container-audit

container-audit is a cursor rule for Cursor from briiirussell/cybersecurity-skills. It costs 123 tokens per session (2,492 once invoked), scanned A, original, MIT.

A security review of Docker images, Dockerfiles, and Kubernetes deployment files. Kubernetes is a system for running and managing containers across machines.

In plain words
What is it for?
Use it to inspect images, Dockerfiles, Helm charts, Kubernetes manifests, deployment pipelines, networking, and secret handling.
Why use it?
It helps uncover unsafe container settings, excessive privileges, exposed secrets, vulnerable image choices, and runtime risks.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to inspect images, Dockerfiles, Helm charts, Kubernetes manifests, deployment pipelines, networking, and secret handling.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/briiirussell/cybersecurity-skills/container-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/briiirussell/cybersecurity-skills

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for container-audit

README.md
[![agentmods](https://agentmods.dev/badge/rules/briiirussell/cybersecurity-skills/container-audit/github.svg)](https://agentmods.dev/rules/briiirussell/cybersecurity-skills/container-audit)
Your own site
<a href="https://agentmods.dev/rules/briiirussell/cybersecurity-skills/container-audit"><img src="https://agentmods.dev/badge/rules/briiirussell/cybersecurity-skills/container-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for container-audit

Your own site · 80×15
<a href="https://agentmods.dev/rules/briiirussell/cybersecurity-skills/container-audit"><img src="https://agentmods.dev/badge/rules/briiirussell/cybersecurity-skills/container-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 123 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,492 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00123 $0.02492
Opus 5 $0.00062 $0.01246
Sonnet 5 $0.00025 $0.00498
Haiku 4.5 $0.00012 $0.00249

Measured 9d ago against content hash b25aa69f478a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

container-audit scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- No `chmod 4755` SUID binaries in the final image

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `ADD <url>` follows redirects and disables checksum verification — prefer `RUN curl ... && sha256sum -c`
adapters/cursor/container-audit.mdc · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Container Audit — Docker & Kubernetes Security Review

Audit container images, Dockerfiles, Helm charts, Kustomize overlays, and Kubernetes manifests for misconfiguration, excessive privilege, exposed secrets, and runtime security gaps. Distinct from cloud-audit (cloud-provider IAM and managed services) and dependency-audit (package CVEs in the application). This skill is the container/orchestration layer between them.

Scope the Audit

  1. Inventory the surface — Dockerfiles, base images, registries, Helm charts, K8s manifests, Kustomize overlays, CI build pipelines that produce images
  2. Identify the runtime — vanilla K8s, EKS, GKE, AKS, OpenShift, ECS Fargate, Cloud Run, Fly.io
  3. Identify the network model — service mesh, ingress controller, default-deny vs default-allow
  4. Identify the secret model — K8s Secrets (base64-only), External Secrets Operator, sealed-secrets, Vault, Doppler

Audit Checklist — Dockerfile

Base image & supply chain

  • Pinned by digest, not tag — FROM node:20@sha256:abc... not FROM node:20 (which can move)
  • Distroless / minimal where possible — gcr.io/distroless/nodejs20, alpine (be aware of musl quirks), chainguard/*
  • Not using :latest — non-reproducible builds
  • Multi-stage builds discard build-time tooling — FROM build AS builderFROM runtime final stage
  • Grep for: FROM .*:latest, FROM .*:[0-9]+$ (tag without digest)

Build-time exposure

  • Secrets passed via --build-arg end up in image layers visible to anyone who pulls the image — use BuildKit secrets (--mount=type=secret) or runtime env vars instead
  • COPY . . ships everything in the build context — .dockerignore should exclude .git, .env, node_modules, *.pem, .aws/, .ssh/
  • ADD <url> follows redirects and disables checksum verification — prefer RUN curl ... && sha256sum -c
  • Grep for: ARG .*KEY, ARG .*TOKEN, ARG .*SECRET, ENV .*=.*[A-Za-z0-9]{32,}, ADD http

Runtime posture

  • Non-root user — USER 1001 (or any non-zero UID) before CMD
  • No chmod 4755 SUID binaries in the final image
  • No unnecessary shells / package managers in the final stage — distroless / FROM scratch is the strong default
  • HEALTHCHECK defined so orchestrator can detect unhealthy containers
  • Read-only root filesystem at runtime (set via K8s; verify nothing in the image writes outside /tmp or a declared volume)
  • Grep for: USER root (or absence of any USER directive), chmod 4755, apt-get install.*sudo

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 194 lines · 123 tokens per session scan A b25aa69f478a

Subscribe to this mod's changes

container-audit is a cursor rule published in the GitHub repository briiirussell/cybersecurity-skills (384 stars, last pushed 3mo ago), licensed MIT. It adds 123 tokens to every session and 2,492 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.