Replies: 2 comments 2 replies
-
hi @candrews thanks for the report - this looks like a bug to me. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi @candrews ! Trivy supports 2 targets when scanning images: files inside the image and image metadata. The ❯ trivy clean --scan-cache
2025-02-17T11:35:13+06:00 INFO Removing scan cache...
❯ trivy i test-img --image-config-scanners misconfig -q | grep AVD-DS-0002
AVD-DS-0002 (HIGH): Last USER command in Dockerfile should not be 'root' |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Trivy's misconfiguration scanner doesn't detect "AVD-DS-0002 (HIGH): Last USER command in Dockerfile should not be 'root'" when run against images. It should detect that issue.
Desired Behavior
AVD-DS-0002 should be reported when running
trivy image --scanners misconfig
.Actual Behavior
Trivy does not report AVD-DS-0002 when run against an image that runs as root.
Note that running a filesystem scan does report this finding as expected:
Reproduction Steps
Target
Container Image
Scanner
Misconfiguration
Output Format
None
Mode
Standalone
Debug Output
Operating System
Linux
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions