Repository navigation
feat(phase-6c): CI/CD deploy pipeline and security review - #24
Merged
Mahakisore7 merged 2 commits intoSep 3, 2026
Merged
Mahakisore7 merged 2 commits into
Mahakisore7 merged 2 commits into
Conversation
Adds .github/workflows/deploy.yml: build/push 3 images to Artifact Registry, apply staging via Terraform, smoke-test /healthz, then a GitHub Environments manual-approval gate before applying production. Authenticates via Workload Identity Federation (infra/terraform/wif.tf) rather than a long-lived service account key. Extends ci.yml with a credential-free terraform fmt/validate job (every PR) and a WIF-gated terraform plan job (push to main only, skips cleanly with a warning until the two required repo secrets exist rather than failing red). Real terraform plan against scene-craft-507404 caught a genuine bug before it could break the pipeline: a for_each over service-account names computed for_each's key set from values that don't exist until apply, which `terraform validate` alone doesn't catch. Fixed by keying the for_each map on the three static role names instead. Also completes the phase's security review checklist (docs/Phases/PHASE-06-SECURITY-REVIEW.md) with real evidence per item — including a live Gemini prompt-injection spot check and an actual captured structured-log line proving no secrets leak into logs — rather than checking items off from memory. Part 3 of 3 for Phase 6. Depends on feat/phase-6a-otel-and-runtime- hardening (Dockerfiles referenced by deploy.yml) and feat/phase-6b-terraform-infrastructure (this branch's own base) both merging first — recommended merge order is 6a, then 6b, then this. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…eployed) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Mahakisore7
merged commit Sep 3, 2026
d7a3c44
into
feat/phase-6b-terraform-infrastructure
12 checks passed
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.
Summary
.github/workflows/deploy.yml: build/push 3 images to Artifact Registry →terraform applystaging → smoke-test/healthz→ GitHub Environments manual-approval gate →terraform applyproduction. Authenticates via Workload Identity Federation (infra/terraform/wif.tf), not a long-lived JSON key.ci.ymlwith a credential-freeterraform fmt/validatejob (every PR) and a WIF-gatedterraform planjob (push tomainonly — skips cleanly with a warning until the two required repo secrets exist, rather than failing red).docs/Phases/PHASE-06-SECURITY-REVIEW.md), not checked off from memory.Live verification
terraform planagainst the real project caught a genuine bugterraform validatealone missed: afor_eachover service-account names computed its key set from apply-time-unknown values. Fixed by keying thefor_eachmap on the three static role names instead — replan confirmed clean (72 resources, 0 errors).Test plan
python -c "import yaml; ..."); noactionlintavailable in this environment, so also manually reviewedterraform fmt -check,terraform validate,terraform plan(documented above)deploy.ymlrun — can't be exercised untilGCP_WORKLOAD_IDENTITY_PROVIDER/GCP_SERVICE_ACCOUNTrepo secrets exist (one-time WIF apply, seeinfra/README.md)Base branch note: targets
feat/phase-6b-terraform-infrastructure(notmain) sincewif.tfextends that PR'sinfra/terraform/— recommended merge order is 6a → 6b → 6c.Part 3 of 3 for Phase 6.
🤖 Generated with Claude Code