docker-audit

Audit Dockerfiles and docker-compose stacks for security, correctness, and efficiency issues.

15|3|Updated Jul 9, 2026
One-click install
npx skills add https://github.com/kiurakku/cursor-kit-for-ai --skill docker-audit-kiurakku
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docker-audit
Source: https://github.com/kiurakku/cursor-kit-for-ai/tree/main/plugins/devops/skills/docker-audit
Command: npx skills add https://github.com/kiurakku/cursor-kit-for-ai --skill docker-audit-kiurakku

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Container configurations often ship with security holes, bloated images, and slow builds that go unnoticed until production incidents occur. This Skill reviews Dockerfiles and docker-compose files against production standards and reports findings by severity instead of a flat checklist. ## Core Features & Use Cases - Three-pass audit: Security pass (non-root runtime, secret leaks, pinned base images), correctness pass (healthchecks, signal handling, restart policies, resource limits), and efficiency pass (multi-stage builds, layer caching, cache cleanup). - Verification commands: Runnable commands such as docker history, docker inspect, hadolint, and trivy to confirm image size, user configuration, leaked secrets, and compose validity. - Severity-ranked report: Output template separates blockers, should-fix items, and optimizations, with every finding including a corrected Dockerfile or compose snippet. - Use Case: Before deploying a Python API, run the audit to discover the container runs as root, the image is 1.2GB because the build stage leaked into runtime, and the healthcheck only tests process liveness — then apply the provided fixes. ## Quick Start Audit the Dockerfile and docker-compose.yml in this project for security, size, and production readiness issues.

Frequently Asked Questions about docker-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit a Dockerfile for security issues?▼

Check for a non-root USER directive, pinned base images with digests, no secrets in ARG or ENV layers, and a .dockerignore excluding .git and .env. Verify with docker history --no-trunc and scan with trivy for HIGH and CRITICAL vulnerabilities.

How to reduce Docker image size for a Python app?▼

Use a multi-stage build so build dependencies stay in stage one and only artifacts reach the runtime stage. Copy requirements.txt and install before COPY . . for layer caching, use --no-cache-dir, and pick a slim or distroless base. A healthy Python API image is roughly 150-250MB.

Why does my Docker container ignore SIGTERM on stop?▼

Shell-form CMD runs the app as a child of a shell that does not forward signals, so every stop becomes a 10-second kill. Use exec-form CMD ["app"] and add init: true or tini if the app spawns child processes.

Does docker-compose depends_on guarantee startup order?▼

No, depends_on only controls start order, not readiness. Use condition: service_healthy with a real healthcheck, and still implement retry logic in the application since depends_on is not a guarantee.

What tools can scan Docker images for vulnerabilities?▼

trivy scans images for HIGH and CRITICAL severity vulnerabilities, while hadolint lints Dockerfiles for best-practice violations. Both complement manual checks like docker inspect for the runtime user and docker history for leaked secrets.