- Home
- Skills
- DevOps & Cloud
- dockerfile security linter
More screenshots
Works with the AI Agents you already use
dockerfile security linter
Lint a Dockerfile for CIS/Docker Bench issues: :latest tags, root USER, ADD from URLs, secrets in ENV, curl|bash pipes and missing HEALTHCHECK.
$6
dockerfile security linter
Example session with this skill installed
Audit the Dockerfile in the current directory and explain why it might be considered unsafe for production.
- Read your context and instructions
- Compiled the dockerfile security linter
I have audited the local Dockerfile using the security linter. The analysis identified 3 HIGH severity issues that need immediate attention to meet CIS benchmarks.
Dockerfile Security Audit Report
| Severity | Instruction | Issue | Risk |
|---|---|---|---|
| HIGH | FROM node:latest | Use of :latest tag | Non-deterministic builds and sudden breaking changes. |
| HIGH | ENV AWS_KEY=AKIA... | Secret in ENV | Credentials are baked into the image layers and visible to all users. |
| HIGH | `RUN curl ... | bash` | Shell pipe injection |
| MEDIUM | EXPOSE 22 | Sensitive port | Unnecessary exposure of SSH increases the attack surface. |
| LOW | Missing | No HEALTHCHECK | Orchestrators cannot verify if the application is internally functional. |
Recommended Remediation
To fix the high-priority issues, update your Dockerfile with these changes:
# 1. Use specific version tags
FROM node:20.11.0-alpine
# 2. Use secrets via mount or build-args (never ENV)
# RUN --mount=type=secret,id=aws_key ...
# 3. Download and verify scripts before execution
RUN curl -fsSL https://example.com/install.sh -o install.sh \
&& sh install.sh \
&& rm install.sh
# 4. Specify a non-root user
USER node
Next steps
- Review k8s pod security standards linter for deploying this container safely.
- Run a secrets pattern scanner to ensure that
AWS_KEYhasn't already been committed to git history. - Check dependency supply chain red flags to audit the node packages inside the image.
Connects securely to your tools. The creator never sees your data.
About this skill
Catch root, :latest and baked-in secrets in your Dockerfile before the image is built.
A Dockerfile is a short file with long consequences. This skill lints it against CIS Docker Benchmark / Docker Bench themes: no tag / :latest, running as root, ADD from URLs, secrets in ENV/ARG, curl|bash pipes, sensitive EXPOSE ports and missing HEALTHCHECK.
What it does
- Parses instructions with line continuations
- Line-numbered findings with a concrete fix for each
- Markdown + CSV; exit 0 when there are no HIGH findings
Who it's for
DevOps and platform engineers, and anyone whose CI builds container images from a Dockerfile.
Limits
Reviews the Dockerfile text only — not a layer CVE / image scan. Not legal advice.
What's included
SKILL.md: workflow, commands, how to explain findingsscripts/: the checker (stdlib Python) plus sharedseccommon.pyreferences/sources.md: specs and guidance citedexamples/: good and bad samples used in the demotests/: unit tests (Python 3.8 / 3.9 / 3.13)
Standard-library Python only. No API keys, no network calls, no installs.
- Offline / local files only — does not fetch live URLs or call cloud APIs.
- Heuristic checks; not a full substitute for a professional audit or pentest.
- Not legal advice and not a certification of compliance.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 20 days ago
Permissions
File Scopes
Fully offline. No subprocess, no network modules used for outbound calls, no credential access.