Repository navigation
False Positive: misconfig DS-0001 triggered on dynamic multi-stage FROM statement using local alias #11578
Closed
jhsesu
started this conversation in
False Detection
Replies: 2 comments
|
Hi @nikpivkin, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
IDs
DS-0001
Description
Target and Misconfiguration ID
DS-0001 (MEDIUM): Specify a tag in the 'FROM' statement for image 'os-'Description
Trivy flags a
DS-0001misconfiguration rule on aFROMstatement that references a local multi-stage build alias dynamically set via anARG.However, all upstream base images defined in the previous stages (
docker.io/rockylinux/rockylinux:10.2-minimalanddocker.io/library/ubuntu:26.04) do explicitly specify precise tags.Trivy appears to parse
os-${OSOUTPUT}as a standalone remote image name missing its tag (interpretingos-as the image name), rather than resolving it as a local reference to the previous multi-stage steps (AS os-rocky10/AS os-ubuntu2604).Containerfile / Dockerfile Sample
Commands Executed
What did you expect to happen?
Trivy should recognize that
os-${OSOUTPUT}evaluates to local stage aliases defined in the same file which already contain specific immutable tags, and therefore it shouldn't triggerDS-0001.Reproduction Steps
$ trivy config .Target
Container Image
Scanner
Vulnerability
Target OS
Rocky Linux 10
Debug Output
Version
Checklist
-f jsonthat shows data sources and confirmed that the security advisory in data sources was correctAll reactions