Skip to content

Harden generated DISPATCH_TOKEN workflows - #661

Merged
jeffhuber merged 1 commit into
mainfrom
antigravity/harden-dispatch-token-654
Sep 3, 2026
Merged

Harden generated DISPATCH_TOKEN workflows#661
jeffhuber merged 1 commit into
mainfrom
antigravity/harden-dispatch-token-654

Conversation

@jeffhuber

Copy link
Copy Markdown
Contributor

Summary

  • run generated workflows that receive DISPATCH_TOKEN from trusted default-branch definitions via pull_request_target
  • retain the same-repository guard and avoid checking out pull-request code
  • cover both source and packaged templates with focused security regression tests

Verification

  • full unittest suite: 853 passed
  • focused init and release-hygiene tests passed
  • Ruff, privacy scan, compileall, and easy-mode smoke test passed

Provenance

  • builder: Antigravity CLI
  • finding source: Claude audit of jeffhuber/codemower.com#171

Closes #654

@jeffhuber jeffhuber added builder:antigravity Experimental Antigravity builder lane dispatched:antigravity Code Mower dispatched Antigravity builder lane needs-codex-audit needs-claude-audit labels Sep 3, 2026
Use pull_request_target without checking out PR code, retaining the same-repository guard for privileged dispatch-token workflows.\n\nCloses #654\n\nCODE_MOWER_BUILDER:antigravity
@jeffhuber
jeffhuber force-pushed the antigravity/harden-dispatch-token-654 branch from ac064f2 to a6d0460 Compare September 3, 2026 23:44
@jeffhuber jeffhuber added v1.0.4 v1.0.4 post-announcement confidence cleanup builder-calibration Controlled builder comparison and calibration work labels Sep 3, 2026
@gitar-bot

gitar-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Hardens generated DISPATCH_TOKEN workflows to run from trusted default-branch definitions via pull_request_target, retaining same-repository guards and avoiding checkout of pull-request code. Security regression tests added for both source and packaged templates. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@jeffhuber

Copy link
Copy Markdown
Contributor Author

Codex audit (merge-authority lane)

Head SHA: a6d04601cdb6982498adcc15490d0056eabd25a1
Findings: P0=0, P1=0, P2=0, P3=0 (blocker policy: any P0/P1/P2 → BLOCKED)

Codex Audit: PASS

Summary:

No blocking issues were found.

Findings: none.

@jeffhuber

Copy link
Copy Markdown
Contributor Author

Claude audit (merge-authority lane)

Head SHA: a6d04601cdb6982498adcc15490d0056eabd25a1
Findings: P0=0, P1=0, P2=0, P3=0 (blocker policy: any P0/P1/P2 -> BLOCKED)

Claude Audit: PASS

Summary:

Switching the agent-PR-labeler and fix-round-dispatch templates from pull_request to pull_request_target is a legitimate hardening: it pins execution to the base-branch workflow definition (so a same-repo PR branch can't tamper with the workflow steps to exfiltrate DISPATCH_TOKEN), no PR code is checked out or executed, the existing same-repo if guard is preserved, and both template copies plus new tests are updated consistently.

Findings: none.

@jeffhuber
jeffhuber merged commit 1004101 into main Sep 3, 2026
25 checks passed
@jeffhuber
jeffhuber deleted the antigravity/harden-dispatch-token-654 branch September 3, 2026 23:52
cursor Bot pushed a commit that referenced this pull request Sep 4, 2026
Complete end-to-end audit of installation and documentation paths
per issue #657. All acceptance criteria verified against v1.0.3
baseline (commit 1004101 with #660 and #661).

Audited documentation:
- Core: README, install, try-in-10-minutes, quickstart, build-loop-in-30-minutes,
  upgrade-existing-repo, troubleshooting, orchestrator-prompt-pack, CONTRIBUTING
- Release: first-user-install-rehearsal, public-release-checklist, pypi-release,
  v1.0-v1.0.3 release notes
- Onboarding: first-run-transcript, first-user-demo-transcript, launch-command-surface,
  self-hosted-mac-runner, local-audit-runner, provider-matrix, github-setup,
  lane-promotion-policy, cloud-sharing, planning-work-orders, builders-grok-cursor,
  builder-experiments

Verified:
- Installation paths (pipx, uv tool, editable) require Python 3.12+
- Cold install vs upgrade flows are explicitly distinct
- Hosted builders directed to proper doctor posture
- CLI behavior documentation consistent with tested implementation
- Internal documentation links valid (manual verification of primary paths)
- Privacy requirements met (no personal data in examples)

Test results:
- Privacy scan: pass
- Ruff lint: pass
- Compileall: pass
- Unit tests: 863 passed
- Trailing whitespace: none

No documentation corrections required. The v1.0.3 documentation is
accurate and internally consistent.

Refs #657

Co-authored-by: Jeff Huber <jeffhuber@users.noreply.github.com>
jeffhuber added a commit that referenced this pull request Sep 4, 2026
Complete end-to-end audit of installation and documentation paths
per issue #657. All acceptance criteria verified against v1.0.3
baseline (commit 1004101 with #660 and #661).

Audited documentation:
- Core: README, install, try-in-10-minutes, quickstart, build-loop-in-30-minutes,
  upgrade-existing-repo, troubleshooting, orchestrator-prompt-pack, CONTRIBUTING
- Release: first-user-install-rehearsal, public-release-checklist, pypi-release,
  v1.0-v1.0.3 release notes
- Onboarding: first-run-transcript, first-user-demo-transcript, launch-command-surface,
  self-hosted-mac-runner, local-audit-runner, provider-matrix, github-setup,
  lane-promotion-policy, cloud-sharing, planning-work-orders, builders-grok-cursor,
  builder-experiments

Verified:
- Installation paths (pipx, uv tool, editable) require Python 3.12+
- Cold install vs upgrade flows are explicitly distinct
- Hosted builders directed to proper doctor posture
- CLI behavior documentation consistent with tested implementation
- Internal documentation links valid (manual verification of primary paths)
- Privacy requirements met (no personal data in examples)

Test results:
- Privacy scan: pass
- Ruff lint: pass
- Compileall: pass
- Unit tests: 863 passed
- Trailing whitespace: none

No documentation corrections required. The v1.0.3 documentation is
accurate and internally consistent.

Refs #657

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builder:antigravity Experimental Antigravity builder lane builder-calibration Controlled builder comparison and calibration work claude-audit-done codex-audit-done dispatched:antigravity Code Mower dispatched Antigravity builder lane v1.0.4 v1.0.4 post-announcement confidence cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Harden generated PR workflows around DISPATCH_TOKEN

1 participant