Skill Detail

Dockerfile Security Hardening Advisor

Audits Dockerfiles for security vulnerabilities using Hadolint and Trivy container scanner. Recommends hardening steps based on CIS Docker Benchmark and Snyk container advisories.

Runbooks & DiagnosticsClaude Code
Runbooks & Diagnostics Claude Code Security Reviewed
Tool match: docker โญ 12.1k GitHub stars
INSTALL WITH ANY AGENT
npx skills add agentskillexchange/skills --skill dockerfile-security-hardening-advisor Copy
Works best when you want a reusable capability, not another fragile one-off prompt.
At a glance
Author
hadolint
Last updated
Mar 20, 2026
Quick brief

The Dockerfile Security Hardening Advisor skill provides comprehensive security auditing for container images starting from the Dockerfile. It runs Hadolint for Dockerfile best practice validation and Trivy for vulnerability scanning of base images and installed packages.

How it works

What this skill actually does

The skill checks Dockerfiles against the CIS Docker Benchmark v1.5 controls, verifying that containers run as non-root users, use specific image tags instead of latest, minimize installed packages, and properly handle secrets. It queries the Snyk Container API for known vulnerabilities in base images.

Using Docker Scout API integration, the skill provides SBOM-based analysis of the final image layers, identifying which layer introduced each vulnerability. It recommends specific base image alternatives with fewer CVEs, comparing options across Alpine, Distroless, and Chainguard images.

The hardening report includes a prioritized action list with copy-paste Dockerfile modifications, estimated CVE reduction for each change, and a compliance score against organizational security policies. Output supports SARIF format for integration with GitHub Advanced Security.