Repository navigation
feat(ci): gate trusted pipeline environment provisioning by phase - #596
agent-relay-code[bot] wants to merge 2 commits into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
[Critical impact] The new apply route can set rules and credential bindings for the trusted pipeline. The PR appears safe to merge, with a non-blocking gap in tests for the new preflight and trusted plan/apply paths.
|
| def test_phases(self): | ||
| check(fixture(), "trusted-environment") | ||
| check(fixture(True), "trusted-bindings") |
There was a problem hiding this comment.
Trusted provisioning paths lack tests
The new tests call check() directly, so they never exercise trusted-pipeline-preflight.sh or either trusted path through session-pipeline-ci.sh. The existing smoke suite does not cover these paths either. A broken preflight or a missing call to it could therefore pass CI.
Add offline tests for both phases covering successful plan/apply, failed API reads, existing binding names, weakened protections, and a changed public key.
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/hosted/tests/test_trusted_pipeline_gate.py
Line: 33-35
Comment:
**Trusted provisioning paths lack tests**
The new tests call `check()` directly, so they never exercise `trusted-pipeline-preflight.sh` or either trusted path through `session-pipeline-ci.sh`. The existing smoke suite does not cover these paths either. A broken preflight or a missing call to it could therefore pass CI.
Add offline tests for both phases covering successful plan/apply, failed API reads, existing binding names, weakened protections, and a changed public key.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Infra repository maintainers: please designate a writer authorized to publish the repair to this branch, or identify the replacement PR. The inventory owner reports one conflict in terraform/scripts/check.sh at 075c938 and no branch changes. Please have the writer confirm acceptance, return the tested revision against current main, and address the remaining review thread before requesting fresh review. This is a source repair; the provisioning hold remains in effect. |
Adds a manual-only Infra plan/apply path for the pinned github-trusted-pipeline-ci root. Plan identity, run attempt, workflow, phase, input version, commit and digest are verified before apply. The phase gate and target preflight run twice. The environment and sealed bindings require separate plans and protected credentials.
Offline verification: three fixture tests (including negative cases), existing hosted runner smoke suite and shell syntax checks. No workflow dispatch or infrastructure changes performed. Requires protected environment setup, private backend and sealed inputs. Code review only, held pending exact-head review and CI.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Adds a manual-only Infra plan/apply path for the pinned
github-trusted-pipeline-ciroot with phase-gated provisioning. Plan identity, run attempt, workflow, phase, input version, commit, and digest are verified before apply.trusted-pipeline-provision.ymlworkflow with separate plan/apply jobs, both restricted to main, using distinct protected environments.trusted-pipeline-gate.pyenforces an exact per-phase plan shape and values;trusted-pipeline-preflight.shchecks live target state before plan and apply.session-pipeline-ci.shgainstrusted-environmentandtrusted-bindingstargets; apply also requires independent review and no admin bypass.Migration
TARGET_REPOSITORY_TOKEN.Written for commit d06a084. Summary will update on new commits.