# Dockerfile Scan

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-novacode37-claude-security-skills-dockerfile-scan`
- **Verified:** Pending review
- **Seller:** [NovaCode37](https://agentstack.voostack.com/s/novacode37)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [NovaCode37](https://github.com/NovaCode37)
- **Source:** https://github.com/NovaCode37/claude-security-skills/tree/main/skills/dockerfile-scan

## Install

```sh
agentstack add skill-novacode37-claude-security-skills-dockerfile-scan
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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

```bash
# 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).

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [NovaCode37](https://github.com/NovaCode37)
- **Source:** [NovaCode37/claude-security-skills](https://github.com/NovaCode37/claude-security-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-novacode37-claude-security-skills-dockerfile-scan
- Seller: https://agentstack.voostack.com/s/novacode37
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
