container-audit

container-audit is a command for coding agents from HermeticOrmus/LibreSecOps-Claude-Code. It costs 0 tokens per session (1,008 once invoked), scanned B, original, MIT.

A security review command for Dockerfiles and Docker Compose files, which describe how containers are built and run. It checks container settings and related .dockerignore files.

In plain words
What is it for?
Use it to review or harden Dockerfile, Containerfile, docker-compose.yml, or podman-compose.yml configurations.
Why use it?
It helps find security misconfigurations before containers are built, deployed, or reviewed. It can focus on concerns such as secrets, privileges, or networking.

Command

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.

agentmods
npx agentmods add commands/hermeticormus/libresecops-claude-code/container-audit
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreSecOps-Claude-Code

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/commands/hermeticormus/libresecops-claude-code/container-audit.svg)](https://agentmods.dev/commands/hermeticormus/libresecops-claude-code/container-audit)
Your own site
<a href="https://agentmods.dev/commands/hermeticormus/libresecops-claude-code/container-audit"><img src="https://agentmods.dev/badge/commands/hermeticormus/libresecops-claude-code/container-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,008 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
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 $0.00000 $0.01008
Opus 5 $0.00000 $0.00504
Sonnet 5 $0.00000 $0.00202
Haiku 4.5 $0.00000 $0.00101

Measured 3d ago against content hash 96efbac8180e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

container-audit scanned grade B 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 3d 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.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Is the package cache cleaned? (`rm -rf /var/cache/apk/*`)

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.

- Are package versions pinned? (`apk add curl=8.5.0-r0`)
plugins/container-security/commands/container-audit.md · 116 lines

How it starts

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

/container-audit

Audit Dockerfiles and docker-compose/podman-compose files for security issues.

Trigger

Use when you need to:

  • Review a Dockerfile before building or deploying
  • Audit a docker-compose.yml or podman-compose.yml for security misconfigurations
  • Harden an existing container setup
  • Prepare container configurations for a security review

Input

One or more of:

  • Dockerfile(s): Any Dockerfile or Containerfile
  • Compose file(s): docker-compose.yml, docker-compose.prod.yml, compose.yaml
  • .dockerignore: To check for missing exclusions
  • Specific concern: Focus area (e.g., "secrets handling", "privilege", "networking")

Process

Dockerfile Audit

  1. Base image assessment

    • Is the base image pinned to a digest? (FROM image@sha256:...)
    • Is the base image from a trusted source? (Official images, Chainguard, verified publishers)
    • Is the base image minimal? (distroless/Alpine/scratch preferred over ubuntu/debian full)
    • Is the base image version pinned? (:3.19 not :latest)
  2. User context

    • Does the Dockerfile include a USER directive?
    • Is the final stage running as root? (default if no USER specified)
    • Are file permissions set appropriately for the non-root user?
  3. Secret exposure

    • Are secrets passed via ARG? (visible in image history)
    • Are secrets COPYed into the image? (persisted in layers even if deleted later)
    • Are secrets in ENV? (visible to any process in the container)
    • Is BuildKit --mount=type=secret used for build-time secrets?
  4. Package management

    • Are package versions pinned? (apk add curl=8.5.0-r0)
    • Is the package cache cleaned? (rm -rf /var/cache/apk/*)
    • Are unnecessary packages installed? (build tools in runtime image)
    • Is --no-install-recommends used with apt-get?
  5. Build hygiene

    • Is multi-stage build used? (separate build and runtime stages)
    • Are COPY commands specific? (not COPY . . without .dockerignore)
    • Is HEALTHCHECK defined?
    • Is ADD used instead of COPY? (ADD has URL and tar extraction, COPY is simpler and safer)

Read the full file on GitHub · 116 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. 3d ago First seen · 116 lines · 0 tokens per session scan B 96efbac8180e

Subscribe to this mod's changes

container-audit is a command published in the GitHub repository HermeticOrmus/LibreSecOps-Claude-Code (4 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,008 tokens. A static security scan graded it B with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.