Skip to content

avoid running this wf from fork #15936

avoid running this wf from fork

avoid running this wf from fork #15936

name: PR CI Security Gate

Check warning on line 1 in .github/workflows/pr-ci-security-gate.yml

View workflow run for this annotation

GitHub Actions / PR CI Security Gate

Workflow execution policy warning (evaluate mode)

On December 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
types: [opened, synchronize, reopened]
permissions:
actions: write
contents: read
pull-requests: write
jobs:
security-gate:
# Members/collaborators/owners trigger PR CI directly — gate only needed for forks
if: "!contains(fromJSON('[\"MEMBER\",\"OWNER\",\"COLLABORATOR\"]'), github.event.pull_request.author_association)"
# Intentionally not passing `secrets: inherit` to avoid leaking secrets in runs triggered from forked repos
uses: huggingface/transformers-ci/.github/workflows/pr-ci-security-gate.yml@main