FS config scan MISCONF DS018 ("the alias is not defined in previous stages") is not valid when using COPY --from=external-image #1621
Labels
kind/bug
Categorizes issue or PR as related to a bug.
Description
The validation for https://avd.aquasec.com/appshield/ds018/ is invalid, since having a reference to external image is valid and supported, see https://docs.docker.com/develop/develop-images/multistage-build/#use-an-external-image-as-a-stage
Trivy could check if the
COPY --from=
argument refers to an existing image and skip this check,OR it could decrease the severity from HIGH to MEDIUM (or even lower),
OR it could just stop checking for this, if it's not possible to differentiate between references to regular images and build stages.
Buildah also supports references to external images "as stages" via this syntax.
What did you expect to happen?
I don't expect this Dockerfile to raise DS018:
but it does.
What happened instead?
Got the error DS018.
Output of run with
-debug
:Output of
trivy -v
:Version: 0.22.0
Additional details (base image name, container registry info...):
The output is from trivy docker image docker.io/aquasec/trivy:latest (sha256:c6f6e688)
The text was updated successfully, but these errors were encountered: