Skip to content

Commit e8a70ba

Browse files
Security hardening from self-review
- Add author_association allowlist to review job (prevents external fork PRs from consuming model serving resources) - Fix assist job ref: was still pointing to feature branch instead of main Co-authored-by: Isaac
1 parent 7995c39 commit e8a70ba

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/claude-code.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ on:
1919

2020
jobs:
2121
# Automatic review on PR open. For re-reviews, comment "@claude review".
22+
# Restrict to collaborators/members/owners to prevent untrusted users
23+
# (e.g. external fork PRs) from consuming model serving resources. See:
24+
# https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
2225
review:
23-
if: github.event_name == 'pull_request'
26+
if: |
27+
github.event_name == 'pull_request' &&
28+
contains(fromJson('["COLLABORATOR","MEMBER","OWNER"]'), github.event.pull_request.author_association)
2429
concurrency:
2530
group: claude-review-${{ github.event.pull_request.number }}
2631
cancel-in-progress: true
@@ -101,7 +106,7 @@ jobs:
101106
owner: 'databricks-eng',
102107
repo: 'eng-dev-ecosystem',
103108
workflow_id: 'cli-claude-code.yml',
104-
ref: 'add-claude-code-workflow',
109+
ref: 'main',
105110
inputs: {
106111
pull_request_number: '${{ steps.pr.outputs.number }}',
107112
event_type: 'assist',

0 commit comments

Comments
 (0)