Skip to content

Isolate builds from approved production deployments - #173

Draft
elliot-bitcast wants to merge 1 commit into
mainfrom
fix/scoped-production-releases
Draft

Isolate builds from approved production deployments#173
elliot-bitcast wants to merge 1 commit into
mainfrom
fix/scoped-production-releases

Conversation

@elliot-bitcast

@elliot-bitcast elliot-bitcast commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Build jobs currently use the shared AWS deployment identity before production approval. This change builds an image without AWS credentials and carries its immutable, checksum-verified archive into a separately authorized deployment job. Production uses a repository-scoped role and protected environment; ordinary staging releases remain automatic.

The deployment publishes the built artifact without rebuilding it. Service releases use a registry digest. The validator preserves the newly merged Terraform-template selection, including its Loki configuration, and verifies the AWS-recorded registering principal is bitcast-terraform; a forged ManagedBy tag is rejected. CODEOWNERS protects all of .github, including the ownership file itself. Image publishers that feed existing scheduled latest tags can publish only after production approval. The production canary and owner still deploy sequentially under one human approval.

Rollout dependency: deploy and verify the scoped roles and GitHub protection settings from https://github.com/bitcast-network/bitcast-infra/pull/767 before merging this PR. Keep the old shared roles only until all consumers have migrated; retire them through the separate final cutover.

Validation: actionlint and Bash syntax checks pass. Companion Terraform policies pass configuration validation and IAM simulation of own-resource access and cross-repository/development-to-production denial. No live service or extra payment task was triggered by this patch.

The validator template identity predicate passes eight checks for both AWS tag encodings, accepting the Terraform role and rejecting the development role, lookalike roles and other accounts.

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