fix(ci): deploy container images by digest, not mutable tags#305
Merged
fix(ci): deploy container images by digest, not mutable tags#305
Conversation
3203b91 to
6e21558
Compare
Capture image digest after GHCR push and pass it through to Terraform. ACR import now uses digest as the source reference for immutable pulls. ACA deployment uses tag@digest format for both readability and integrity. Closes #299 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
6e21558 to
52bddda
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Capture GHCR image digest after push and use it for immutable ACR import and ACA deployment.
Why
GHCR→ACR import and ACA deployment used mutable image tags. A compromised GHCR image with the same tag could be deployed without detection.
Changes
.github/workflows/deploy.yml:docker pushviadocker inspectsha256:<64 hex>) before proceedingimage_digestto Terraform applyinfra/variables-apps.tf:image_digestvariable with format validationinfra/container-apps.tf:@digestas source (immutable pull from GHCR)image_tagtoimage_digestacr_imageusestag@digestformat (tag for readability, digest for integrity)Design decisions
tag@digestformat: Valid OCI spec, supported by ACA/containerd. Tag provides human readability in Azure Portal; digest is authoritative.How to test
cd infra && terraform init -backend=false && terraform validateReview notes
Closes #299