This is an automated email from the ASF dual-hosted git repository.

zclllyybb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 467e7e7a6a2 [Fix](security) Only allow committer and collaborator to 
trigger code-review (#62904)
467e7e7a6a2 is described below

commit 467e7e7a6a210c652d8ff944b18a5daa1deeb083
Author: zclllyybb <[email protected]>
AuthorDate: Tue Apr 28 16:16:41 2026 +0800

    [Fix](security) Only allow committer and collaborator to trigger 
code-review (#62904)
    
    Because there is a real possibility of prompt injection in the AI Review
    pipeline
---
 .github/workflows/opencode-review-comment.yml | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/opencode-review-comment.yml 
b/.github/workflows/opencode-review-comment.yml
index 93ce886faee..d042da95ac5 100644
--- a/.github/workflows/opencode-review-comment.yml
+++ b/.github/workflows/opencode-review-comment.yml
@@ -15,7 +15,12 @@ jobs:
     runs-on: ubuntu-latest
     if: >-
       github.event.issue.pull_request &&
-      startsWith(github.event.comment.body, '/review')
+      startsWith(github.event.comment.body, '/review') &&
+      (
+        github.event.comment.author_association == 'MEMBER' ||
+        github.event.comment.author_association == 'OWNER' ||
+        github.event.comment.author_association == 'COLLABORATOR'
+      )
     outputs:
       pr_number: ${{ steps.pr.outputs.pr_number }}
       head_sha: ${{ steps.pr.outputs.head_sha }}
@@ -48,7 +53,12 @@ jobs:
       - mark-review-pending
     if: >-
       github.event.issue.pull_request &&
-      startsWith(github.event.comment.body, '/review')
+      startsWith(github.event.comment.body, '/review') &&
+      (
+        github.event.comment.author_association == 'MEMBER' ||
+        github.event.comment.author_association == 'OWNER' ||
+        github.event.comment.author_association == 'COLLABORATOR'
+      )
     uses: ./.github/workflows/opencode-review-runner.yml
     secrets: inherit
     with:
@@ -62,7 +72,12 @@ jobs:
     runs-on: ubuntu-latest
     if: >-
       github.event.issue.pull_request &&
-      startsWith(github.event.comment.body, '/review')
+      startsWith(github.event.comment.body, '/review') &&
+      (
+        github.event.comment.author_association == 'MEMBER' ||
+        github.event.comment.author_association == 'OWNER' ||
+        github.event.comment.author_association == 'COLLABORATOR'
+      )
     steps:
       - name: Mark Code Review status as pending
         env:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to