Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Dockerfile Security Audit

    by CashonlyTian

    1

    Audit Dockerfiles for secrets, root access, and unpinned images with a graded 0-100 score and visual report.

    $29

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Dockerfile Security Audit

    Dockerfile Security Audit

    Example session with this skill installed

    Audit the Dockerfiles in the ./webapp-api directory for the 'FinTrack' project. Use a blue accent for the report card.

    • Read your context and instructions
    • Compiled the dockerfile security audit
    • Generated the document

    I have completed the security audit for the

    FinTrack project. I scanned all Dockerfiles in the ./webapp-api directory and identified 14 findings ranging from critical to medium risk.

    The audit resulted in a Score of 42/100, earning a Grade D with a HIGH risk level.

    Dockerfile Security Audit: FinTrack

    CategoryScoreFindingsKey Issues
    Base Image0/152Using :latest tag in production builds.
    User Safety0/151No USER instruction defined; running as root.
    Secrets5/152Hardcoded API_KEY in ENV and .env copied.
    Hygiene7/104Missing --no-install-recommends in apt-get.
    Hardening5/105Missing HEALTHCHECK and WORKDIR.

    Top 3 Prioritized Fixes

    Remove Secrets: The Dockerfile at ./webapp-api/Dockerfile:12 contains a hardcoded ENV secret. Masked as API_KEY=***. Use BuildKit secrets or runtime environment variables instead.
    2.

    Switch to Non-Root User: Add a USER instruction to the final stage of your Dockerfiles to prevent container breakout attacks.
    3.

    Pin Base Images: Change FROM node:latest to a specific version or digest, such as FROM node:20.11.0-alpine or node@sha256:....

    Generated Artifacts:

    • Visual Score-Card: scan-2023-10-27.png
    • Detailed Audit Report: scan-report.md

    Next steps

    • Open scan-report.md to see the full list of 14 findings and their exact line numbers.
    • Apply the top 3 fixes to improve your grade from D to B.
    • Run the audit again after applying changes to verify the new score.

    scan-2023-10-27.png

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Shipping containerized applications without a security audit is a liability. This skill scans your repository's Dockerfiles to identify configuration risks, secret leaks, and insecure runtime patterns before they hit production.

    What it does

    • Base image validation identifies unpinned tags or the use of :latest to prevent supply chain attacks.
    • Root user detection flags containers running with excessive privileges and recommends non-root USER instructions.
    • Secret leak scanning finds hardcoded ENV/ARG values, copied .env files, and credentials baked into images.
    • Instruction auditing detects dangerous patterns like curl|sh, ADD of remote URLs, and missing health checks.
    • Build hygiene checks evaluates package manager flags, cache cleanup, and .dockerignore efficiency.

    How it works

    1. Point the agent to a local repository directory containing Dockerfiles.
    2. The agent executes a local Python script to perform a 10-point security check across all identified files.
    3. It generates a visual score-card PNG and a detailed Markdown report with a grade (A-F) and risk level.
    4. Review the prioritized fix list to address critical vulnerabilities like baked-in secrets or weak permissions.

    Frameworks & tools

    This tool uses a local Python scanner and image rendering engine. It targets Docker and OCI-compliant Dockerfiles, supporting specific package managers including apt, apk, and pip.

    Why this beats prompting it yourself

    Manual prompting often misses nuanced Dockerfile instructions like ADD vs COPY behavior or specific package manager cache flags. This skill applies a rigid 10-point scoring rubric, ensuring consistent audits and providing a shareable visual artifact that generic LLM chat cannot produce.

    Use cases

    • Auditing legacy Dockerfiles before migrating to a new production environment.
    • Reviewing third-party or open-source repo Dockerfiles before building them.
    • Generating security compliance artifacts for client deliverables or PR reviews.
    • Benchmarking internal container standards across multiple microservices.

    Known limitations

    The scanner cannot verify if a curl|sh line is checksum-guarded or if a secret value is a dummy placeholder. It ignores files over 2MB and binary objects.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Cannot verify if shell pipes use checksums. Ignores files >2MB. Scans local text only, not live registries or running containers. Masking applied to secret values in reports.

    How to use

    1. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    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 5 days ago

    Software
    Python 3Pillow

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed5 days ago

    What's inside

    Frequently Asked Questions

    The skill performs a local scan of your repository to detect hardcoded credentials, unpinned base images, root user risks, and inefficient build patterns, providing a graded 0-100 security score.

    You receive the specialized auditing agent skill, the local Python scanning script, and the image rendering engine used to generate the visual scorecards and Markdown reports.

    This skill is designed for agents with local file system access; simply point the agent to your repository directory, and it will automatically locate and analyze all OCI-compliant Dockerfiles.

    While an LLM can provide general advice, this skill uses a rigid 10-point scoring rubric and a dedicated scanner to ensure consistency and produce a shareable visual artifact that standard chat prompts cannot generate.

    The scanner supports Dockerfiles using common package managers like apt, apk, and pip, though it cannot verify external script checksums or distinguish between dummy data and real secrets.

    The audit focuses on the Dockerfile configuration itself, such as instruction patterns and base image tags, rather than scanning the finished binary image layers for OS-level CVEs.

    New in LLM Ops