FahamLah

Commands

trivy image

trivy image [--severity <list>] [--exit-code <n>] <image>

Risk: Safe

What it does

Scans an image for known holes (CVEs) in its packages.

When to use it

After every build, before you push or deploy.

Example

$ trivy image --severity CRITICAL --exit-code 1 kedai-kancil:scan

Fail (exit code 1) if any critical hole is found.