From 2b2bc81810a5cb6d3c091495e1224803cf56da8c Mon Sep 17 00:00:00 2001 From: krabat Date: Fri, 20 Nov 2026 06:53:57 +0000 Subject: [PATCH] ci(claude): let only members and mega-putin start a review round from a comment The pr-review job ran for any PR comment, including from outside the organization on this public repository, and minted the App token and checked out the PR head before the action's own permission check. Require MEMBER, COLLABORATOR or OWNER, or the mega-putin agent, whose rewritten comments drive the reconcile round. Fixes ME-FE-20261028-001. --- .github/workflows/claude.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 25710daab..dec9a16c3 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -59,6 +59,9 @@ jobs: concurrency: group: claude-pr-review-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event_name == 'pull_request' && 'code' || 'comment' }} cancel-in-progress: false + # A PR comment may start a reconcile round only from a member, collaborator or + # the mega-putin agent: the job mints an App token and checks out the PR head + # before the action's own permission check runs. if: | (github.event_name == 'pull_request' && (github.event.action == 'opened' || @@ -68,6 +71,10 @@ jobs: (github.event_name == 'issue_comment' && github.event.issue.pull_request != null && github.event.comment.user.login != 'mega-maxwell[bot]' && + (github.event.comment.author_association == 'MEMBER' || + github.event.comment.author_association == 'COLLABORATOR' || + github.event.comment.author_association == 'OWNER' || + github.event.comment.user.login == 'mega-putin[bot]') && !contains(github.event.comment.body, 'claude-review:skip')) runs-on: ubuntu-24.04 timeout-minutes: 30