Interview Prep/Jenkins/Integrations: SonarQube, Nexus, Artifactory, Docker, Trivy

Why scan the image before pushing it?

AdvancedConceptIntegrations: SonarQube, Nexus, Artifactory, Docker, Trivy
Answer

If you push first and scan afterwards, a vulnerable image already exists in the registry with a valid tag, and anything watching the tag (Argo CD image updater, a developer running pull) may deploy it. Building to a local tarball (Kaniko --no-push --tar-path, docker save, BuildKit type=oci), scanning it, and only then pushing guarantees that every image in the registry passed the gate.

All Jenkins questions Roadmap: Jenkins

More on Integrations: SonarQube, Nexus, Artifactory, Docker, Trivy