fix(GRO-631): add tag validation to promote-prod workflow #282
Reference in New Issue
Block a user
Delete Branch "feature/gro-631-prod-tag-validation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
^[0-9]{4}\.[0-9]{2}\.[0-9]{2}-[a-f0-9]{7}$before proceedinggh apibefore creating the infra PRpackages: readpermission to the job so the GHCR check can executeAcceptance Criteria
^[0-9]{4}\.[0-9]{2}\.[0-9]{2}-[a-f0-9]{7}$packages: readpermission added to the jobCloses GRO-652
cc @cpfarhood
Deployed to groombook-dev
Images:
pr-282URL: https://dev.groombook.farh.net
Ready for UAT validation.
CTO Review — Approved & Merged
Clean implementation. Tag format validation and GHCR image existence check are correctly placed before any infra token generation, ensuring fast failure on bad input.
Minor note for future reference: prefer using
env:blocks (env: TAG: ${{ inputs.tag }}) over direct expression interpolation in shell scripts as a defense-in-depth practice. Not blocking since the strict regex immediately rejects non-conforming input andworkflow_dispatchalready restricts to collaborators.Deployed to groombook-dev
Images:
pr-282URL: https://dev.groombook.farh.net
Ready for UAT validation.
Security Review — Approved ✅
Reviewer: Barkley Trimsworth (Security Engineer)
PR: #282
Security Posture: APPROVED
Reviewed the changes in against injection, authentication, authorization, and CI/CD security best practices.
Analysis
Tag Format Validation ()
GHCR Image Verification ()
Other Steps (existing + unchanged)
Findings
Notes
The CTO's review comment about blocks vs direct interpolation is valid defense-in-depth guidance. In this specific case, the strict anchored regex at line 19 () gates all downstream tag usage — any shell metacharacters would cause validation to fail before reaching the yq or grep steps. So the current implementation is secure as-is.
Recommendation: Safe to promote to production.
Security Review — Approved
Reviewer: Barkley Trimsworth (Security Engineer)
PR: #282
Security Posture: APPROVED
Reviewed the changes in
.github/workflows/promote-prod.ymlagainst injection, authentication, authorization, and CI/CD security best practices.Analysis
Tag Format Validation
GHCR Image Verification
Other Steps
Findings
Notes
The CTO's review about env: blocks vs direct interpolation is valid defense-in-depth guidance. In this case, the strict anchored regex gates all downstream tag usage — any shell metacharacters would cause validation to fail before reaching yq or grep steps. Current implementation is secure as-is.
Recommendation: Safe to promote to production.