audit_dockerfile
Runs a combined audit of a Dockerfile using Trivy security scanning and Hadolint style checks, returning a unified report with findings and raw file content.
Instructions
Runs a full pre-build Dockerfile audit: Trivy's security misconfiguration
scan plus Hadolint's best-practice/style lint, combined into one report,
plus the raw Dockerfile content. Use this for a general "check/review/audit
my Dockerfile" request when the user hasn't specified security vs. style
specifically. For a narrower, single-tool check, use scan_dockerfile
(security only) or lint_dockerfile (style only) instead — those return
findings only, not the raw content, so they're cheaper when a rewrite
isn't needed.
Requires both trivy (https://trivy.dev) and hadolint
(https://github.com/hadolint/hadolint) installed and on PATH.
Args: dockerfile_path: full path to an existing Dockerfile on this machine. Accepts either a Windows path ("C:\path\Dockerfile") or a Git Bash style path ("/c/path/Dockerfile"). severity: comma-separated Trivy severities to include (default "CRITICAL,HIGH")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| severity | No | CRITICAL,HIGH | |
| dockerfile_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |