modelcontextprotocol / modelcontextprotocol/servers

README gate confirmation command can be used by any commenter, bypassing the "readme: pending" gate

Open Beginner friendly
#4,796 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Description

Description

The handle-confirmation job in .github/workflows/readme-pr-check.yml
(line 63) swaps the gating label from readme: pending to
readme: ready for review whenever any comment on the PR contains the magic
string, without checking who wrote the comment:

handle-confirmation:
  if: github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '/i-promise-this-is-not-a-new-server')

The job verifies neither github.event.comment.user.login /
author_association, nor that the commenter is the PR author or a maintainer.
The gate exists to enforce the policy "we are no longer accepting PRs to add
new servers to the README" (see the bot's comment posted by
check-readme-only). Any third party — not just the PR author — can comment
/i-promise-this-is-not-a-new-server and move the PR past the gate, since the
magic string is written out verbatim in the bot's own public comment.

Trigger scenario

  1. A fork PR modifies only README.md (e.g. to add a new server), so
    check-readme-only applies the readme: pending label.
  2. The PR author — or any unrelated user — comments
    /i-promise-this-is-not-a-new-server.
  3. handle-confirmation removes readme: pending and adds
    readme: ready for review, silently bypassing the maintainers' gate.

Impact

A review-process bypass: new-server PRs that the maintainers intended to block
can be marked ready for review without maintainer involvement. No secrets or
OIDC capabilities are exposed (the job only has pull-requests: write), so
the impact is limited to workflow integrity.

Suggested fix

Restrict the confirmation to trusted actors, e.g.:

if: github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '/i-promise-this-is-not-a-new-server') && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)

(or require the commenter to equal github.event.issue.user.login, if the
intent is that only the PR author may confirm).

I'd be happy to open a PR with the author_association check. Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open .github/workflows/readme-pr-check.yml and inspect the handle-confirmation job around line 63, including the issue_comment trigger and author fields described in the report. Restrict the confirmation to the intended trusted actor and verify that an unrelated commenter can no longer change the labels while the intended confirmation still moves readme: pending to readme: ready for review.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.