container-scan

container-scan is a skill for Claude Code, Codex from vladkesler/initrunner. It costs 30 tokens per session (547 once invoked), scanned B, original, Apache-2.0.

A code-review checklist for Dockerfiles, the files that describe how to build container images. It checks for common security and maintenance issues, such as root users, exposed secrets, unpinned base images, and missing health checks.

In plain words
What is it for?
Use it to review Dockerfiles and Docker Compose files for leaked credentials, risky user permissions, loosely specified base images, unsuitable ADD commands, missing health checks, and package-manager problems.
Why use it?
It helps find unsafe container settings before an image is built or deployed. It also identifies practices that can make builds less transparent or harder to maintain.

Skill for Claude CodeCodex

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 skills/vladkesler/initrunner/container-scan
Any agent
npx skills add vladkesler/initrunner --skill container-scan
Clone the repo
git clone --depth 1 https://github.com/vladkesler/initrunner

Made for: Claude Code, Codex.

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-scan

README.md
[![agentmods](https://agentmods.dev/badge/skills/vladkesler/initrunner/container-scan.svg)](https://agentmods.dev/skills/vladkesler/initrunner/container-scan)
Your own site
<a href="https://agentmods.dev/skills/vladkesler/initrunner/container-scan"><img src="https://agentmods.dev/badge/skills/vladkesler/initrunner/container-scan.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 547 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.00030 $0.00547
Opus 5 $0.00015 $0.00273
Sonnet 5 $0.00006 $0.00109
Haiku 4.5 $0.00003 $0.00055

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

Security

Grade B, and why

container-scan 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 4d 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.

- Missing `rm -rf /var/lib/apt/lists/*` cleanup in the same layer

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` from remote URLs (use `COPY` + `curl` instead for
examples/roles/security-scanner/skills/container-scan/SKILL.md · 77 lines

What it actually says

Dockerfile security review skill. No external tools needed -- this is pure code review of Dockerfile content.

When to activate

Use this skill when the repository contains Dockerfile or docker-compose.yaml files.

Scanner approach

Read each Dockerfile with read_file. Analyze line by line for the following checks.

Checks

1. Running as root

  • No USER instruction means the container runs as root
  • USER root without switching to a non-root user later
  • Flag as high severity

2. Unpinned base image

  • FROM using :latest tag or no tag at all
  • Recommend pinning to a specific version or digest

3. Secret exposure

  • ENV or ARG instructions with password, secret, key, or token values baked into the image
  • COPY .env or COPY of credential files into the image
  • Flag as critical -- secrets persist in image layers

4. COPY vs ADD

  • ADD from remote URLs (use COPY + curl instead for transparency and caching)
  • ADD of archives without needing extraction (use COPY)

5. Missing HEALTHCHECK

  • No HEALTHCHECK instruction in the final stage
  • Flag as low severity (best practice)

6. Package manager hygiene

  • apt-get install without --no-install-recommends
  • Missing rm -rf /var/lib/apt/lists/* cleanup in the same layer
  • Large image size from uncleaned package caches

7. Multi-stage builds

  • Single-stage builds that include build tools (gcc, make, npm) in the final image
  • Recommend multi-stage to separate build and runtime

MUST flag

  • No USER instruction (runs as root by default)
  • Secrets in ENV or ARG instructions
  • COPY .env or COPY of known credential files
  • ADD from remote URLs

MUST NOT flag

  • Dev/CI Dockerfiles (Dockerfile.dev, Dockerfile.test, Dockerfile.ci)
  • scratch or distroless base images (no USER needed, no shell)
  • Multi-stage builds where root is only used in the builder stage
  • HEALTHCHECK absence in builder stages (only matters in final stage)
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. 4d ago First seen · 77 lines · 30 tokens per session scan B f054855a26d4

Subscribe to this mod's changes

container-scan is a skill published in the GitHub repository vladkesler/initrunner (41 stars, last pushed 6d ago), licensed Apache-2.0. It adds 30 tokens to every session and 547 once invoked, about $0.0002 per session on Opus 5. 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-30.