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 $0.00048 $0.00256
Sonnet 5 $0.00019 $0.00102
Haiku 4.5 $0.00010 $0.00051

Measured 10d ago against content hash 0f65cf9b406e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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 executioncurl|wget … | sh (docker-remote-exec).
  • Remote ADDADD http://… without integrity checks (docker-add-remote).
  • Hardcoded secretsENV/ARG with a secret-looking name and a value (docker-hardcoded-secret).
  • Loose permissionschmod 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. 10d 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 (11 stars, last pushed today), licensed MIT. It adds 96 tokens to every session and 512 once invoked, about $0.0005 per session on Opus 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.

Related

Other skills, from other repositories

docker-debugger

Debug Docker containers, fix Dockerfile issues, optimize images, and troubleshoot docker-compose. Use when having Docker problems, container issues, or optimizing Docker builds.

OneWave-AI/claude-skills · 35 tokens

owasp-security

Use when reviewing code for security vulnerabilities, implementing authentication/authorization, handling user input, or discussing web application security. Covers OWASP Top 10:2025, ASVS 5.0, LLM Top 10 (2025), and Agentic AI security (2026).

agamm/claude-code-owasp · 62 tokens

kubernetes-security

Harden a Kubernetes cluster's data plane and control plane. Covers Pod Security Standards (Restricted, Baseline, Privileged), RBAC with least privilege, NetworkPolicy default-deny, secrets management without raw env vars, admission controllers (Kyverno, OPA Gatekeeper), image scanning, and audit logging. Invoke when…

GoldenWing-360/claude-security-skills · 88 tokens

docker-container-security

Run containers with a defensive baseline that survives production. Covers non-root users, read-only filesystems, dropped Linux capabilities, secret mounts instead of build-time bake-in, image scanning with trivy, distroless and minimal base images, and the Docker-bypasses-UFW firewall pitfall. Invoke when adding…

GoldenWing-360/claude-security-skills · 89 tokens

cloud-security-engineer

Cloud Security Engineer role bundle for cloud security posture management, IaC review, container security, and identity governance across AWS, Azure, and GCP. Orchestrates cloud-specific posture reviews and zero trust program assessments. Auto-invoked when the user needs help with cloud security configuration, IaC…

UnitOneAI/SecuritySkills · 79 tokens

report-writing

Bug bounty report writing for H1/Bugcrowd/Intigriti/Immunefi — report templates, human tone guidelines, impact-first writing, CVSS 3.1 scoring, title formula, impact statement formula, severity decision guide, downgrade counters, pre-submit checklist. Use after validating a finding and before submitting. Never use…

Mikacr1138/claude-bug-bounty · 82 tokens