Pular para o conteúdo principal

Implement container image signing and verification

Implementation Effort: High – Configuring signing with Notation and Key Vault, wiring verification into pipelines and admission control, and maintaining trust policies is an ongoing engineering commitment. User Impact: Low – Signing and verification run inside build and deployment pipelines configured by administrators; end users are not affected. Lifecycle Stage: Build

Overview

Require container images to be signed at build time and verified before deployment so only trusted, tamper-evident images run in production.

Container images are the deployment unit for modern cloud-native applications, and they pass through multiple stages before running in production. Each handoff creates an opportunity for tampering: a compromised build agent can inject a backdoor, a threat actor with registry write access can replace a tagged image, or a misconfigured platform can pull from an untrusted source.

Without cryptographic signing and verification, these substitutions are difficult to detect because container runtimes pull images by tag or digest without proving who built them or whether the artifact changed after build.

Container image signing uses cryptographic keys to attach a signature to an image at build time, proving the identity of the signer and the integrity of the image contents. Azure Container Registry supports signing with Notation, an open-source tool from the Notary Project, using certificates and keys stored in Azure Key Vault. GitHub Actions and Azure Pipelines can automate this signing step as part of image build-and-push workflows.

At deployment time, verification engines such as Ratify integrate with Azure Kubernetes Service through Azure Policy admission control to enforce that only images bearing valid signatures from trusted signers are admitted to the cluster. AKS Image Integrity uses Ratify and Azure Policy to validate image signatures at admission time.

For Azure Container Apps, Azure App Service, and Azure Container Instances — which do not support Kubernetes admission controllers — enforce signature verification in CI/CD before deployment. Capture the image digest after docker push or from the Azure Container Registry API, run notation verify <registry>/<image>@<digest> with a trust policy that references your Azure Key Vault certificate, and fail the pipeline if the exit code is non-zero. Use the Notation GitHub Action or equivalent Azure DevOps task patterns to integrate this step. On those platforms, Azure Policy can govern surrounding resources, but signature enforcement must occur in the deployment workflow.

Without image signing and verification, organizations have no cryptographic proof that the container running in production is the same one their pipeline built from reviewed source code. That weakens artifact integrity, complicates incident response, and makes registry or build-system tampering harder to detect before release. By cryptographically proving each image's signer and integrity before it is admitted to production, this task supports Verify explicitly and Assume breach.

Reference