Repository navigation
fix(gh-aw): harden bootstrap provenance - #2145
Merged
Merged
Conversation
Reject same-named tag dispatches and preserve trusted install provenance across default-branch fast-forwards.\n\nSource: octodemo/zava-social-queue-worker-20261002092250#1\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
🟡 Impact Analysis — PR #2145Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (5 files)
tests (2 files)
This report is generated automatically for every PR. See #733 for details. |
Contributor
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | All 1 Copilot thread(s) resolved |
| ✅ | CI passing | All checks passing |
Files Changed (7 files, +175 −25)
| File | +/− |
|---|---|
.changeset/harden-bootstrap-provenance.md |
+8 −0 |
test/gh-aw-bootstrap-workflow.test.ts |
+57 −4 |
test/gh-aw-review-guard.test.ts |
+72 −1 |
workflows/package/squad-bootstrap.md |
+2 −2 |
workflows/shared/squad-review-guard.mjs |
+30 −12 |
workflows/squad-bootstrap.md |
+2 −2 |
workflows/squad-workflows.manifest.json |
+4 −4 |
Total: +175 −25
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation fails closed and has strong mutation coverage; only a minor stale explanatory comment remains.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Hardens bootstrap provenance against same-named tags while permitting verified default-branch fast-forwards.
Changes:
- Requires the exact default-branch ref.
- Validates recorded install ancestry using GitHub compare evidence.
- Adds regression, mutation, and failure-path coverage.
| File | Description |
|---|---|
workflows/squad-bootstrap.md |
Strengthens the canonical ref gate. |
workflows/package/squad-bootstrap.md |
Updates the generated package artifact. |
workflows/shared/squad-review-guard.mjs |
Adds ancestry verification. |
workflows/squad-workflows.manifest.json |
Refreshes integrity digests. |
test/gh-aw-bootstrap-workflow.test.ts |
Tests exact-ref and mutation behavior. |
test/gh-aw-review-guard.test.ts |
Tests compare evidence and API failures. |
.changeset/harden-bootstrap-provenance.md |
Records package patch releases. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Address Copilot review on bradygaster/squad#2145.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

What
Hardens Squad Bootstrap provenance in two places: the bootstrap workflow now requires the exact default branch ref instead of a matching ref name, and the review guard accepts recorded install provenance across legitimate default-branch fast-forwards only when GitHub's compare response proves the recorded install SHA is the base and merge base of the live PR base.
Why
A
workflow_dispatchon a tag named like the default branch could pass the old gate, while a valid bot-authored Cast PR became permanently unverifiable whenever the live default branch advanced after its trusted install run. Confirmed against octodemo/zava-social-queue-worker-20261002092250#1 at source SHA98afdbec6809b23495054020768dfb377c487da8.How
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)in the canonical bootstrap source and regenerated package/manifest artifacts.provenance.install_sha.provenance.install_sha...pr.base.sha, accepting onlyidenticaloraheadand requiring bothbase_commit.shaandmerge_base_commit.shato equal the recorded install SHA.npx changeset add/.changeset/*.md, directCHANGELOG.mdentry for maintainers, orskip-changeloglabel for no user-facing changes)PR Readiness Checklist
Branch & Commit
dev(notmain)dev(git fetch upstream && git rebase upstream/dev)git diff --cached --stat)Build & Test
npm run buildpassesnpm testpasses (all tests green)npm run lintpasses (type check clean)npm run lint:eslintpassesValidation evidence:
vitest run test/gh-aw-*.test.ts --maxWorkers=2: 28 files, 1,968 tests passed.npm run build: passed.gh aw compile --strict: 8 workflows succeeded with exactly the two documented warnings.test: passed on final head190ac6ec(6m25s). Local full-suite attempts exposed workspace-state interference, so the clean CI run is the authoritative complete-suite result.Changeset
npx changeset add(ifpackages/squad-sdk/src/orpackages/squad-cli/src/changed)CHANGELOG.mdentry (maintainers only — write-protected for external contributors)skip-changeloglabel applied (if no user-facing changes)Docs
N/A - trust-boundary bug fix with no user-facing workflow syntax change.
Exports
N/A - no SDK exports changed.
Breaking Changes
None.
Waivers
None. The complete monorepo suite is not waived; required CI checks must pass before merge.