Skip to content

feat(phase-6c): CI/CD deploy pipeline and security review - #24

Merged
Mahakisore7 merged 2 commits into
feat/phase-6b-terraform-infrastructurefrom
feat/phase-6c-cicd-deploy-pipeline
Sep 3, 2026
Merged

Mahakisore7 merged 2 commits into
feat/phase-6b-terraform-infrastructurefrom
feat/phase-6c-cicd-deploy-pipeline

Conversation

@Mahakisore7

Copy link
Copy Markdown
Contributor

Summary

  • .github/workflows/deploy.yml: build/push 3 images to Artifact Registry → terraform apply staging → smoke-test /healthz → GitHub Environments manual-approval gate → terraform apply production. Authenticates via Workload Identity Federation (infra/terraform/wif.tf), not a long-lived JSON 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).
  • Completes the Phase 6 security review checklist with real evidence per item (docs/Phases/PHASE-06-SECURITY-REVIEW.md), not checked off from memory.

Live verification

  • A real terraform plan against the real project caught a genuine bug terraform validate alone missed: a for_each over service-account names computed its key set from apply-time-unknown values. Fixed by keying the for_each map on the three static role names instead — replan confirmed clean (72 resources, 0 errors).
  • Security review: live Gemini prompt-injection spot check (passed), real captured structured-log line proving no secret values leak, all local pytest auth/ownership boundary tests passing (deployed re-verification honestly deferred — no staging applied yet).

Test plan

  • YAML syntax validated (python -c "import yaml; ..."); no actionlint available in this environment, so also manually reviewed
  • terraform fmt -check, terraform validate, terraform plan (documented above)
  • Full deploy.yml run — can't be exercised until GCP_WORKLOAD_IDENTITY_PROVIDER/GCP_SERVICE_ACCOUNT repo secrets exist (one-time WIF apply, see infra/README.md)

Base branch note: targets feat/phase-6b-terraform-infrastructure (not main) since wif.tf extends that PR's infra/terraform/ — recommended merge order is 6a → 6b → 6c.

Part 3 of 3 for Phase 6.

🤖 Generated with Claude Code

Mahakisore7 and others added 2 commits September 3, 2026 13:33
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
Mahakisore7 merged commit d7a3c44 into feat/phase-6b-terraform-infrastructure Sep 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant