Skip to content

Commit 6171c26

Browse files
authored
Merge pull request #243 from netwrix/dev
updated doc reviewer
2 parents 67c7f13 + cee4dba commit 6171c26

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/claude-documentation-reviewer.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Documentation Reviewer
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened, edited, reopened, synchronize]
66
paths:
77
- '**.md'
@@ -23,8 +23,8 @@ jobs:
2323
- name: Checkout repository
2424
uses: actions/checkout@v4
2525
with:
26-
# Ensures the action checks out the PR branch instead of main
27-
ref: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
26+
# Use head SHA (not branch ref) to prevent TOCTOU attacks from forks
27+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
2828
fetch-depth: 0 # Need full history to compare with base branch
2929

3030
- name: Get changed markdown files

0 commit comments

Comments
 (0)