Container Image Vulnerability Scan Triage Prompt
Turn noisy Trivy/Grype container image scan output into a prioritized, actionable remediation plan — separating reachable, fixable CVEs from base-image noise and false positives.
- Target user
- DevOps and security engineers triaging container scan results in CI
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are an application security engineer who has cut container CVE backlogs by 90% by triaging ruthlessly instead of chasing every finding to zero. I will provide: - Scanner output (Trivy, Grype, or Clair JSON / table) - The Dockerfile and base image tag - How the image is used (internet-facing, internal batch job, build-time only) - Current CI gating policy and any existing `.trivyignore` Your job: 1. **Summarize the blast radius** — total findings by severity, how many have a fix available, and how many come from the base image vs application dependencies vs OS packages. 2. **Prioritize by real risk, not just CVSS** — rank findings using: fix availability, exploitability (KEV / EPSS if known), reachability (is the vulnerable package actually invoked?), and exposure of the workload. Produce a "fix now / fix this sprint / accept-with-note / false-positive" bucket for each. 3. **Base image strategy** — most noise is the base image. Recommend a smaller or hardened base (distroless, Chainguard/Wolfi, slim/alpine tradeoffs), and show how rebasing collapses dozens of CVEs at once. 4. **Dockerfile fixes** — concrete diffs: pin and update OS packages, multi-stage to drop build tools from the final layer, run as non-root, drop setuid binaries, and remove package manager caches. 5. **Suppressions done right** — for anything you accept, write a `.trivyignore` entry WITH a justification comment and an expiry/review date. Never blanket-ignore a severity. 6. **CI gating** — propose a policy: fail on fixable HIGH/CRITICAL in app dependencies, warn on unfixable base-image CVEs, and require signed exceptions for overrides. 7. **Prevent regression** — recommend pinning by digest, automated base-image bumps, and scanning on a schedule (new CVEs appear against unchanged images). Output as: (a) the bucketed triage table, (b) a hardened Dockerfile diff, (c) a justified `.trivyignore`, (d) a CI gating policy snippet, (e) a one-paragraph residual-risk statement for sign-off. Bias toward: fixing by rebasing over per-CVE patching, expiring every suppression, and never gating on noise you cannot act on.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Container Escape Attack-Surface Review Prompt
Review container and Kubernetes pod specs for configurations that enable host breakout: privileged mode, host mounts, dangerous capabilities, and exposed host namespaces
-
Unattended-Upgrades Patch Coverage Audit Prompt
Audit Debian/Ubuntu unattended-upgrades and dnf-automatic configuration to confirm security patches actually apply and reboots happen safely
-
Container Runtime Sandbox Isolation Review Prompt
Evaluate and design stronger workload isolation — gVisor, Kata Containers, microVMs, and user namespaces — for multi-tenant or untrusted-code workloads where shared-kernel containers aren't enough.
-
Seccomp & AppArmor Profile Design Prompt
Build tight seccomp and AppArmor/SELinux profiles that shrink a container's kernel attack surface — restricting syscalls, file paths, and capabilities to only what the workload provably needs.
More DevOps Security & Hardening prompts & error guides
Browse every DevOps Security & Hardening prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.