image misconfiguration incorrect reports COPY command has more than two arguments #5959
Replies: 3 comments
-
The problem appears to be in https://github.com/aquasecurity/trivy-policies/blob/main/checks/docker/copy_with_more_than_two_arguments_not_ending_with_slash.rego - @simar7 appears to be the individual working in that area. |
Beta Was this translation helpful? Give feedback.
-
Here's the relevant line in the |
Beta Was this translation helpful? Give feedback.
-
I submitted a pull requests at aquasecurity/trivy-checks#56 which (once someone helps me get it right) will fix this issue. |
Beta Was this translation helpful? Give feedback.
-
IDs
When a COPY command has more than two arguments, the last one should end with a slash.
Description
Trivy is incorrectly reporting that the
Dockerfile
COPY
command has more than 2 arguments and therefore the last one should end with a slash, when in fact theCOPY
has only 2 arguments.The output even shows that the
COPY
command has 2 arguments:Reproduction Steps
1. `docker run -it aquasec/trivy:0.48.3 image --scanners misconfig --image-config-scanners misconfig eclipse-temurin:21-jre-alpine@sha256:9a21ac97b76e52f4b58d5d6c7fdd459cd600cce8724a31fc0a2b4346b35bced2`
Target
Container Image
Scanner
Misconfiguration
Target OS
No response
Debug Output
Version
Checklist
-f json
that shows data sources and confirmed that the security advisory in data sources was correctBeta Was this translation helpful? Give feedback.
All reactions