Skip to content

Commit 4501d69

Browse files
authored
Run Claude review for external PRs safely (#123)
1 parent 1bce0eb commit 4501d69

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/claude-review.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Claude PR Review
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize, ready_for_review]
4+
pull_request_target:
5+
types: [opened, synchronize, ready_for_review, reopened]
66

77
permissions:
88
contents: read
@@ -22,6 +22,10 @@ jobs:
2222
- uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
25+
# On pull_request_target, keep checkout on the trusted base-repo ref.
26+
# The Claude action can review the PR via GitHub context/API without
27+
# executing untrusted fork code with repository secrets.
28+
persist-credentials: false
2529

2630
- name: Compose review prompt
2731
id: compose

0 commit comments

Comments
 (0)