From today, Wednesday 2 December 2026, GitHub Actions blocks pull_request_target workflows by default in affected public repositories, unless an Actions event policy explicitly allows them. GitHub announced the change on 2 November, ran two brownouts (9 and 16 November), and confirmed the enforcement date in today’s changelog post.

If you maintain an open-source project that labels, triages or comments on pull requests from forks, some of your workflows may have stopped running today. This guide explains why GitHub made the change, how to find affected workflows, and the three safe ways forward.

Who is affected?

  • Public repositories on GitHub Free, GitHub Team and GitHub Enterprise Cloud.
  • Repositories that were relying on the default pull_request_target policy. If you already configured an applicable Actions event policy, it still applies.
  • Not affected: private and internal repositories, and GitHub Enterprise Server.

When a workflow is blocked, the run doesn’t execute. During the brownouts, blocked attempts showed up as failed runs with an error annotation.

Why GitHub is doing this

pull_request_target runs in the context of the base repository. The job gets the base repo’s GITHUB_TOKEN (which can be read/write) and access to repository and organisation secrets. That’s safe as long as the workflow only runs trusted code from the default branch, which is what happens by default.

The danger, which GitHub’s security guide calls a “pwn request”, starts when a workflow checks out the fork’s code and then runs it:

# INSECURE. Example only.
on:
  pull_request_target:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ github.event.pull_request.head.sha }}
      - run: make test   # runs the fork's Makefile with your secrets

An attacker only has to open a pull request whose Makefile, build script, test, dependency or config file contains malicious commands. Those commands then run with your secrets and token. The docs note this has been the root cause of several supply-chain compromises.

Step 1: Find affected workflows

Find every workflow that uses the trigger:

grep -rln "pull_request_target" .github/workflows/

Across an organisation, GitHub’s code search works too:

org:your-org path:.github/workflows pull_request_target

Then check Policy insights in the repository or organisation settings (Settings → Actions → Policies). It shows workflow runs the default rule would block, or has blocked.

For each workflow, ask the two questions from GitHub’s guide:

  1. Can it use pull_request instead? If it doesn’t need secrets or a write token, it should.
  2. Is any checked-out pull request code ever executed? Remember that npm install, pip install, build tools and config files can all run code.

Option A: Switch to pull_request (most CI jobs)

If the job just builds and tests a contribution, use pull_request. It runs the workflow from the PR’s merge commit with a read-only token and no secrets for forks, which is exactly what untrusted code should get:

on:
  pull_request:

permissions:
  contents: read

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - run: npm ci && npm test

If you need secrets for one later step (for example posting a coverage comment), split the work. Run untrusted code in a pull_request workflow, upload the results as an artifact, and use a separate privileged workflow that only reads that artifact as data. Never execute it. GitHub’s guide warns that artifacts from fork runs must be treated as untrusted.

Option B: Keep pull_request_target, but allow it explicitly

Some automation really does need the trigger: labelling PRs from forks, posting triage comments, or running authenticated checks that never execute PR code. For those:

  1. Go to Settings → Actions → Policies (repository or organisation level).
  2. Create or update a policy and choose an enforcement status. Evaluate lets you watch insights first. Active enforces.
  3. Under Restrict events, allow pull_request_target.
  4. Target specific workflow files, such as .github/workflows/label.yml, rather than the whole repo.

GitHub’s warning is clear: only allow the event after confirming the workflow won’t run untrusted PR code with access to secrets or a privileged token. A safe labeller looks like this. It never checks out the PR:

name: label
on:
  pull_request_target:
    types: [opened, synchronize]

permissions:
  contents: read
  pull-requests: write

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@v7

actions/labeler reads its rules from .github/labeler.yml in the base branch, so no PR code runs.

Policies can also be managed through the REST API endpoints for GitHub Actions policies, which helps if you run many repositories.

Option C: Leave the block in place

If nothing in your repo should use pull_request_target, do nothing. The default rule now blocks it, so a workflow added later can’t quietly bring back the risky pattern without someone explicitly allowing it. Remove dead workflows that use the trigger so contributors aren’t confused by blocked runs.

Harden whatever still uses the trigger

From GitHub’s hardening checklist:

  • Least-privilege tokens: set permissions: explicitly and give each job only the secrets it needs.
  • Caching: pull_request_target runs have read-only access to the default branch’s cache, so they can’t poison it. Don’t override that with a write-capable cache-mode.
  • Runners: self-hosted runners must be isolated from internal resources and not reused between runs.
  • Injection: treat PR titles, branch names and bodies as untrusted input in run: steps. Pass them through environment variables, not ${{ }} interpolation inside shell scripts.
  • Scanning: enable CodeQL for GitHub Actions to catch common workflow vulnerabilities.

The allow-unsafe-pr-checkout escape hatch

actions/checkout now refuses to check out fork pull request head refs in this context unless you set allow-unsafe-pr-checkout: true. The docs say the name is deliberately easy to spot in code review. Only use it if the checked-out code is inspected as data and never executed. It doesn’t cover other ways of fetching code, such as git fetch, gh pr checkout or downloaded artifacts.

Quick decision table

Your workflow… Do this
Builds and tests PR code Switch to pull_request
Needs secrets and PR code Split into pull_request + a privileged workflow that reads artifacts as data
Labels/comments, never checks out PR code Allow pull_request_target for that file only
Isn’t needed any more Delete it and keep the default block

Takeaway

Today’s enforcement closes one of the most abused paths into open-source CI pipelines. Spend half an hour on it: grep for pull_request_target, check Policy insights, move build jobs to pull_request, and explicitly allow only the few workflows that need elevated trust and never run fork code.

Sources: GitHub Changelog, 2 Dec 2026, Securely using pull_request_target, Governing execution of Actions workflows.