Use docker_* env var from build job in sbom

Description

Sbom is using $DOCKER_SNAPSHOT_IMAGE. When overriding DOCKER_SNAPSHOT_IMAGE in build job with custom rules, sbom fails to get the image manifest.

Implementation ideas

Maybe something like below would ensure it will always inspect the image built in the pipeline.


docker-sbom:
  dependencies:
    - docker-dind-build
    - docker-kaniko-build
  variables:
    DOCKER_SNAPSHOT_IMAGE: "${docker_repository}:${docker_tag}@${docker_digest}"