Skip to content

Commit 7ec1ef0

Browse files
committed
security: gate pr-triage secrets on same-repository pull_request_target
1 parent e2676fc commit 7ec1ef0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/pr-triage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ on:
1212

1313
jobs:
1414
agent-triage-pull-request:
15-
if: github.event_name == 'workflow_dispatch' || !contains(github.event.pull_request.labels.*.name, 'google-contributor')
15+
if: >-
16+
github.event_name == 'workflow_dispatch' || (
17+
github.event.pull_request.head.repo.full_name == github.repository &&
18+
!contains(github.event.pull_request.labels.*.name, 'google-contributor')
19+
)
1620
runs-on: ubuntu-latest
1721
permissions:
1822
pull-requests: write

0 commit comments

Comments
 (0)