Use image name artifact with container scanning
What does this MR do?
Fixes the container scanning job on master builds.
They're currently failing because the image to be scanning is defined as DOCKER_IMAGE=$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHA:current. This is not true for master builds.
To simplify things, this MR uses the value of built_image.txt as the DOCKER_IMAGE to be scanned. This is valid for every branch build.
What are the relevant issue numbers?
gitlab-org/gitlab#327071 (comment 571961556)
Tested on master in a fork: https://gitlab.com/thiagocsf-group/demo/dast/-/pipelines/300609890
GitLab Docs MR
Edited by Thiago Figueiró