fix(ci): restrict README gate confirmations - #4807
Open
FanouZeng-TT wants to merge 1 commit into
Open
FanouZeng-TT wants to merge 1 commit into
FanouZeng-TT wants to merge 1 commit into
Conversation
Only allow the PR author or trusted repository actors to confirm README-only PRs, preventing unrelated commenters from moving pending submissions to ready for review. Fixes modelcontextprotocol#4796 Co-Authored-By: Claude Code <noreply@anthropic.com>
12 tasks
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.
Description
Fixes #4796.
The README confirmation workflow currently accepts
/i-promise-this-is-not-a-new-serverfrom any commenter on a README-only PR with thereadme: pendinglabel. This lets unrelated users move a PR toreadme: ready for revieweven though the gate is intended for the PR author or trusted maintainers.This change keeps the existing command flow, but only allows the confirmation when the commenter is either:
OWNER,MEMBER, orCOLLABORATOR).It also adds the explicit
issues: writepermission to the confirmation job because the job removes and adds issue labels.Server Details
Motivation and Context
The command is printed in a public bot comment. Without checking who sent it, any GitHub user can bypass the
readme: pendingreview gate described in the workflow comment.How Has This Been Tested?
.github/workflows/readme-pr-check.ymlas YAMLgit diff --checkOWNER,MEMBER, andCOLLABORATORare allowedBreaking Changes
No breaking changes. The existing confirmation command remains unchanged for the PR author and trusted repository actors.
Types of changes
Checklist
Additional context
This workflow never checks out or executes PR code; the change only gates an API-only label transition for README-only PRs.
🤖 Generated with Claude Code