Skip to content

InsightsSecurity

GitHub Actions will block pull_request_target in public repositories from 2 December

On 2 November 2026 GitHub moved enforcement of a default policy that blocks pull_request_target in public repositories to 2 December, with two brownouts first. What the policy does, how to find workflows it would stop and how to fix or allow them.

Published November 9, 20265 min read

On 2 November 2026 GitHub announced that GitHub Actions will block pull_request_target events by default in public repositories from 2 December 2026, unless an applicable Actions event policy explicitly allows them. Enforcement had previously been scheduled for 2 November. Before the permanent change there are two brownouts, on 9 November and 16 November, from 16:00 to 18:00 UTC, during which the rule is enforced and affected runs fail.

If you maintain public repositories, or an organization that does, the dates are close enough that checking now is worth an hour.

What is changing

ItemDetail
RuleA default event policy that blocks pull_request_target
Applies toPublic repositories on GitHub Free, Team and Enterprise Cloud
Does not apply toPrivate and internal repositories, and GitHub Enterprise Server
Brownouts9 and 16 November 2026, 16:00 to 18:00 UTC
Permanent enforcement2 December 2026

During a brownout, a blocked run in an affected repository fails with an error annotation and the workflow does not execute. When the window ends the rule goes back to evaluate mode, and the same workflows run again with warnings. Evaluate mode records what would have been blocked without blocking it.

Why this trigger

pull_request runs the merge commit of a pull request, and for pull requests from forks GitHub gives it a read-only token and no secrets. pull_request_target runs in the context of the base repository's default branch. It exists so that a workflow can act on pull requests from forks, for example by labelling or commenting on them, and the workflow can access the base repository's secrets.

That is safe only while the workflow never runs code from the pull request. GitHub's guide to using the trigger securely calls the failure a "pwn request": a workflow that checks out the fork's code and then executes it while holding secrets or a write token. The guide is explicit that execution is wider than your own steps. npm install, npm run build, configuration files and dependencies can all run attacker-controlled code, and "execution does not require an obvious build step". The same guide lists cache poisoning as a risk.

A default block moves the decision from "who remembered to be careful" to "who explicitly asked for it".

Find what would be blocked

Open the repository, organization or enterprise Settings, then Actions, then Policies. Under the policies page is Policy insights, which shows runs blocked by active policies and runs that would have been blocked by policies in evaluate mode. GitHub's changelog points to Insights as the way to see what the default rule would block, and recommends doing it before 9 November.

If you cannot use Insights, search for the trigger directly:

terminal
gh search code "pull_request_target" --owner your-org \
  --filename ".yml" --json repository,path

Reusable workflows and workflows in other repositories also matter, so read the results rather than counting them.

Decide for each workflow

Most pull_request_target workflows fall into one of three groups.

1. It never needed to be that trigger. Workflows that build, lint or test fork code, and use no secrets, should use pull_request. GitHub's guide says exactly this: if you do not need extra secret access, use pull_request.

2. It only handles metadata. Labelling, commenting and triage need the base repository's token but not the pull request's code. These are the legitimate uses. Keep them, keep the token narrow and keep the pull request out of any run step except as environment data:

.github/workflows/triage.yml
on:
  pull_request_target:
    types: [opened, reopened]
 
permissions:
  contents: read
  pull-requests: write
 
jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - name: Add triage label
        run: gh pr edit "$PR_NUMBER" --add-label triage --repo "$GITHUB_REPOSITORY"
        env:
          GH_TOKEN: ${{ github.token }}
          PR_NUMBER: ${{ github.event.pull_request.number }}

Passing values through env and quoting them avoids putting pull request fields, such as the title or branch name, into the shell script.

3. It needs both fork code and secrets. This is the hard case, and where the old pattern was most dangerous. Separate the two jobs: build and test the fork's code under pull_request with no secrets, and let a second workflow that holds secrets consume only the result. The guide warns that a workflow_run workflow can be vulnerable too, and that artifacts uploaded by another workflow should be treated as untrusted data, since they may come from a fork. Parse them, do not execute them. GitHub's guide points to the GitHub Security Lab for the full split-workflow design.

If you do need to allow it

An event policy can allow the trigger. In Settings, Actions, Policies, a policy has a name, an enforcement status, a target and its protections. Under Restrict events you list the events a policy permits, such as push, pull_request, pull_request_target and workflow_dispatch. Including pull_request_target there allows it. A policy can be limited to specific workflow files, so allow the triage workflow by path rather than every workflow in the repository.

Two limits from the documentation:

  • Evaluate mode for your own policies is available only on GitHub Enterprise Cloud. On Free and Team you cannot trial a policy of your own before it blocks runs.
  • The changelog does not describe the exact settings screens or API calls for the allow case. Follow Control workflow execution and test on one repository first.

Allowing the event is a security exception. Write down who owns the workflow and why it needs the trigger, as you would for any other exception.

What to do this week

  1. Check Policy insights or search for the trigger before the 16:00 UTC brownout on 9 November. Expect failed runs in affected public repositories during that window.
  2. Move workflows in the first group to pull_request.
  3. For metadata workflows, set a minimal permissions block, pass pull request values through env and confirm there is no checkout of the pull request head.
  4. Split the third group before 2 December, or allow them by workflow path with an owner.
  5. Use the 16 November brownout as the rehearsal for what remains. If both windows pass without failures, enforcement on 2 December should not surprise you.
  6. Check that required status checks do not depend on a pull_request_target workflow. A blocked run that never reports may leave pull requests unmergeable.

This closes one class of mistake. It does not make an allowed workflow safe, and it says nothing about actions your workflows call. For that, see workflow lockfiles, which pin what the runner executes, and the package firewall, which covers what npm install pulls in.