Grant issues:write so the PR Review workflow can start - #3975
Merged
Conversation
The PR Review workflow granted only issues:read, but its reusable workflow's conclusion and safe_outputs jobs request issues:write for failure and no-op run tracking. GitHub rejects the permission escalation before any job starts, so every PR Review run since the workflow was added has failed with a startup error. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
theletterf
approved these changes
Aug 31, 2026
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.
The
PR Reviewworkflow has failed to start on every pull request since it was added — GitHub rejects it before any job runs.Affects: Automation
Why
The workflow's
permissions:block grants onlyissues: read, but the reusable workflow it calls hasconclusionandsafe_outputsjobs that requestissues: writefor failure and no-op run tracking. GitHub validates that a caller's permissions cover every nested job's request, and rejects the whole run as a permission escalation when they don't. All 100 most recent runs ofpr-review.ymlended instartup_failurewith no jobs ever created.What
Workflow permissions
.github/workflows/pr-review.ymlnow grantsissues: writeinstead ofissues: read, matching the grant other Elastic repos already use successfully for the same reusable workflow (elastic/ai-github-actions/.github/workflows/gh-aw-pr-review.lock.yml@v0).Made with Cursor