Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/claude-code-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
(github.event_name == 'pull_request_review_comment' &&
github.event.comment.user.login != 'claude[bot]' &&
(contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association) ||
contains(fromJson('["coderabbitai[bot]","Copilot"]'), github.event.comment.user.login)))
(github.event.pull_request.head.repo.full_name == github.repository &&
contains(fromJson('["coderabbitai[bot]","Copilot","copilot-pull-request-reviewer[bot]","gemini-code-assist[bot]"]'), github.event.comment.user.login))))
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
Expand Down Expand Up @@ -55,7 +56,7 @@ jobs:
if: >-
github.event_name == 'check_run' &&
github.event.check_run.conclusion == 'failure' &&
!startsWith(github.event.check_run.name, 'Claude Code')
!startsWith(github.event.check_run.name, 'claude-code / ')
concurrency:
group: claude-ci-fix-${{ github.event.check_run.head_sha }}
cancel-in-progress: true
Expand All @@ -80,6 +81,15 @@ jobs:
"repos/${{ github.repository }}/commits/${{ github.event.check_run.head_sha }}/pulls" \
--jq '[.[] | select(.state == "open")] | first | .number // empty')
fi
# Trust gate: skip fork PRs — this job has write/secret access
if [ -n "$PR" ]; then
HEAD_REPO=$(gh api "repos/${{ github.repository }}/pulls/$PR" \
--jq '.head.repo.full_name // empty')
if [ "$HEAD_REPO" != "${{ github.repository }}" ]; then
echo "Skipping: fork PR (head=$HEAD_REPO)"
PR=""
fi
fi
echo "number=$PR" >> "$GITHUB_OUTPUT"
- name: Checkout repository
if: steps.pr.outputs.number != ''
Expand Down
Loading