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:scanFail (exit code 1) if any critical hole is found.
Learn it in: Stop the line on critical CVEs · Official docs