dockerfile-scan

dockerfile-scan is a skill for Claude Code from NovaCode37/claude-security-skills. It costs 96 tokens per session (512 once invoked), scanned D, original, MIT.

A text scanner for Dockerfiles, which are build instructions for container images. It looks for common unsafe commands and settings without requiring Docker or a network connection.

In plain words
What is it for?
Use it to review base-image tags, USER settings, remote curl or wget commands, remote ADD instructions, secret-like ENV or ARG values, chmod 777, and sudo usage.
Why use it?
It points out patterns that can expose secrets, run containers as root, execute untrusted remote code, weaken file permissions, or make image sources less reproducible.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-security-skills plugin — 8 skills shipped together

Good fit Use it to review base-image tags, USER settings, remote curl or wget commands, remote ADD instructions, secret-like ENV or ARG values, chmod 777, and sudo usage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/novacode37/claude-security-skills/dockerfile-scan
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.

Any agent
npx skills add NovaCode37/claude-security-skills --skill dockerfile-scan
Clone the repo
git clone --depth 1 https://github.com/NovaCode37/claude-security-skills

Made for: Claude Code.

Or install claude-security-skills, the plugin that ships this one along with the rest of its 8 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/novacode37/claude-security-skills/dockerfile-scan/github.svg)](https://agentmods.dev/skills/novacode37/claude-security-skills/dockerfile-scan)
Your own site
<a href="https://agentmods.dev/skills/novacode37/claude-security-skills/dockerfile-scan"><img src="https://agentmods.dev/badge/skills/novacode37/claude-security-skills/dockerfile-scan/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 dockerfile-scan

Your own site · 80×15
<a href="https://agentmods.dev/skills/novacode37/claude-security-skills/dockerfile-scan"><img src="https://agentmods.dev/badge/skills/novacode37/claude-security-skills/dockerfile-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 512 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 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.00096 $0.00512
Opus 5.5 $0.00038 $0.00205
Sonnet 5.5 $0.00019 $0.00102
Haiku 4.5 $0.00010 $0.00051

Measured 1mo ago against content hash 0f65cf9b406e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

dockerfile-scan scanned grade D with 3 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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scanner.py, tests/test_scanner.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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 rootmediumPrivilege escalation

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

hardcoded secrets in ENV/ARG, world-writable chmod 777, and sudo usage. Use

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- **Remote code execution** — `curl|wget … | sh` (`docker-remote-exec`).

Makes network callslowCapability

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

:latest base images, ADD from remote URLs, piping curl/wget into a shell,
skills/dockerfile-scan/SKILL.md · 56 lines

What it actually says

Dockerfile Security Scan

Parses a Dockerfile and flags common security and supply-chain problems, each with a concrete fix. Pure text analysis — no Docker daemon, no network, stdlib only.

When to use this skill

  • "Review this Dockerfile for security issues."
  • "Is my container running as root?"
  • "Lint my Dockerfiles before I push them."

What it checks

  • Base image pinning — missing tag or :latest (docker-no-tag, docker-latest-tag).
  • Runs as root — no USER, or final USER is root (docker-root-user).
  • Remote code execution — curl|wget … | sh (docker-remote-exec).
  • Remote ADD — ADD http://… without integrity checks (docker-add-remote).
  • Hardcoded secrets — ENV/ARG with a secret-looking name and a value (docker-hardcoded-secret).
  • Loose permissions — chmod 777 (docker-chmod-777).
  • sudo usage in RUN (docker-sudo).

How to run it

# Scan one Dockerfile
python skills/dockerfile-scan/scanner.py path/to/Dockerfile

# Scan every Dockerfile under a directory, as JSON
python skills/dockerfile-scan/scanner.py . --json

Exit codes: 0 clean · 1 findings present · 2 usage/IO error.

  1. Run the scan on the file or repo.
  2. Present findings by severity, each with its one-line fix.
  3. Offer a corrected Dockerfile snippet (pinned base image, non-root USER, COPY instead of remote ADD, secrets moved to runtime).
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 56 lines · 96 tokens per session scan D 0f65cf9b406e

Subscribe to this mod's changes

dockerfile-scan is a skill published in the GitHub repository NovaCode37/claude-security-skills (13 stars, last pushed 16d ago), licensed MIT. It adds 96 tokens to every session and 512 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it D with 3 findings (asks for root, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.