agentsclimarketplace

Dockerfile scan

Skill NovaCode37/claude-security-skills/skills/dockerfile-scan

Production-ready Claude Code skills for cybersecurity — secret scanning, SAST, prompt-injection testing, HTTP/JWT/dependency auditing. Zero dependencies.

Install
npx -y skills add NovaCode37/claude-security-skills --skill dockerfile-scan

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Scan a Dockerfile for insecure build patterns — running as root, unpinned or :latest base images, ADD from remote URLs, piping curl/wget into a shell, hardcoded secrets in ENV/ARG, world-writable chmod 777, and sudo usage. Use when the user asks to "review my Dockerfile", "is this container image secure", "lint my Dockerfile for security", or "why does my image run as root".

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

1.9 KB, as published. Nobody here has run it

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.

Recommended workflow for Claude

  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).

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.