Repository navigation
fix(ci): restrict release test token permissions (STA-4970) - #15675
Conversation
3a47348 to
40ff7a8
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe release workflow now grants Merge Risk: ⚪ Minimal · up to The release workflow now uses read-only contents access by default and grants write access only to publishing jobs; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ELI5
Release tests were running code from the new release tag while holding the same repository-write token used to create tags and releases. This changes the default token to read-only and gives write access back only to jobs that actually publish or dispatch release work.
What Changed
Why
GitHub Actions jobs inherit workflow-level permissions unless a job replaces them. The previous contents: write default therefore reached four non-publishing jobs that checked out and executed release-tagged code. Defining read as the authoritative default is the smallest structural fix; existing publishing and dispatch jobs already declare their exact writes.
Linked Issue
STA-4970
Originating PR: #14934
Visual Proof
N/A - CI workflow and static policy test only; no UI or interaction change.
Testing
I manually tested these changes locally
Automated tests added/updated
Candidate policy oracle: 3/3 passed.
origin/main baseline: 3/3 failed on inherited write permissions.
Candidate with inherit-write fault injection: 3/3 failed with the same permission deltas.
Release workflow contracts: 76 passed, 1 existing skip.
pnpm lint: passed.
pnpm typecheck: passed.
actionlint syntax validation, YAML parsing, and effective 20-identity permission matrix: passed.
No Electron run: application behavior did not enter scope.
Review
Three fresh gpt-5.6-luna Codex reviewers independently challenged reproduction, permission boundaries, and test quality. Five validated test hardening findings were fixed; the final round was clean from all three reviewers.
Agent skill upstream boundary
Notes
No runtime, platform, SSH, folder-workspace, wire, Git, or provider behavior changes. The macOS publisher retains contents: write; release-cut dispatch jobs retain actions: write; no packages, OIDC, or attestation permission is currently requested.
Checklist