Overview
Lint a Dockerfile (text or base64 in dockerfile_b64) like hadolint plus security checks: container runs as root (no USER), latest/untagged base images, secrets baked into ENV/ARG or RUN, curl | sh, ADD from URLs without checksum, ADD vs COPY, sudo, chmod 777, apt-get update/install hygiene (same layer, -y, --no-install-recommends, clean lists), apk/pip caches, npm install vs npm ci, exposed SSH port, shell-form CMD/ENTRYPOINT (no SIGTERM), relative WORKDIR, deprecated MAINTAI
Protocol
x402
Price
$0.0020
Payment Asset
USD Coin
Payment Network
Base
Category
media/images
Provider
Dockerfile linter security
Indexed
2026-12-01 21:26:57
Health
Status
healthy
Latency (p50)
114ms
Uptime (30d)
100.0%
Reliability Score
97/100
Last Checked
2026-12-05 14:37:08
Last Healthy
2026-12-05 14:37:08
Consecutive Failures
0
Output Schema
{
"example": {
"counts": {
"high": 2,
"info": 2,
"low": 5,
"medium": 4
},
"final_user": "root",
"findings": [
{
"fix": "Add a non-root user, e.g. RUN useradd -r app && USER app (or USER 1000)",
"line": null,
"message": "The final stage has no USER: the container runs as root",
"rule": "runs-as-root",
"severity": "high"
},
{
"fix": "Pass it at runtime (docker run -e / orchestrator secrets)",
"line": 3,
"message": "ENV API_TOKEN bakes a secret-like value into the image",
"rule": "secret-in-env",
"severity": "high"
},
{
"fix": "Pin a version tag (e.g. node:22-alpine) or a digest",
"line": 1,
"message": "Base image 'node:latest' uses the latest tag: builds are not reproducible",
"rule": "base-latest",
"severity": "medium"
},
{
"fix": "Use RUN apt-get update && apt-get install -y ... in one instruction",
"line": 2,
"message": "apt-get install without apt-get update in the same RUN (stale cached package index)",
"rule": "apt-update-separate",
"severity": "medium"
},
{
"fix": "Use ADD --checksum=sha256:... or RUN curl + verify",
"line": 4,
"message": "ADD downloads a remote file without checksum verification",
"rule": "add-url",
"severity": "medium"
},
{
"fix": "Use docker exec / kubectl exec instead of sshd",
"line": 7,
"message": "Exposes port 22 (SSH in a container is rarely needed)",
"rule": "expose-ssh",
"severity": "medium"
},
{
"fix": "Add --no-install-recommends",
"line": 2,
"message": "apt-get install pulls recommended packages (bigger image, more attack surface)",
"rule": "apt-recommends",
"severity": "low"
},
{
"fix": "End with && rm -rf /var/lib/apt/lists/*",
"line": 2,
"message": "apt lists are not cleaned in the same layer",
"rule": "apt-lists",
"severity": "low"
},
{
"fix": "Add -y",
"line": 2,
"message": "apt-get install without -y may hang the build",
"rule": "apt-no-yes",
"severity": "low"
},
{
"fix": "Use npm ci (with --omit=dev for production)",
"line": 6,
"message": "npm install can change versions; npm ci installs exactly the lockfile",
"rule": "npm-install",
"severity": "low"
},
{
"fix": "Use exec form: CMD [\"node\",\"server.js\"]",
"line": 8,
"message": "CMD in shell form: the app does not get SIGTERM, so shutdowns are slow/unclean",
"rule": "shell-form",
"severity": "low"
},
{
"fix": "Add HEALTHCHECK CMD ... or use liveness/readiness probes",
"line": null,
"message": "No HEALTHCHECK (fine if your orchestrator probes the container)",
"rule": "no-healthcheck",
"severity": "info"
},
{
"fix": "Keep a .dockerignore (exclude .git, .env, node_modules, keys)",
"line": 5,
"message": "COPY . copies the whole build context",
"rule": "copy-all",
"severity": "info"
}
],
"instructions": 8,
"multi_stage": false,
"note": "Static lint (security + best practice, similar to hadolint core rules). It does not build the image or scan packages for CVEs.",
"score": 32,
"stages": [
{
"image": "node:latest",
"line": 1,
"name": null
}
],
"summary": "11 issue(s); worst: The final stage has no USER: the container runs as root",
"verdict": "fix_now"
},
"type": "json"
}