Skip to content
Beta
All articles

GitHub blocks pull_request_target by default on 2 December: what to check now

Public repositories lose pull_request_target unless a policy allows it. The brownout dates, who is affected, and how to decide which workflows still need it.

By The SpanDock team

6 min read

A timeline from the general availability of workflow execution protections on 17 September 2026, through brownouts on 9 and 16 November, to enforcement of the default pull_request_target block on 2 December 2026

From 2 December 2026, workflows in public GitHub repositories that run on the pull_request_target event will be blocked unless an Actions event policy explicitly allows them. GitHub announced the date on 2 November, a month later than first planned, and it will run two short brownouts before then so that affected workflows fail visibly in advance. Any team that maintains an open-source project, or runs automation that comments on, labels or reviews pull requests from forks, should look at its workflows this month rather than on the morning of 2 December.

This article explains what the default policy does, who it applies to, why GitHub is doing it, and how to decide which workflows still need the event.

What changes, and when

pull_request_target has been around for years. What is new is a default rule built on workflow execution protections, which became generally available on 17 September 2026. Those protections let an owner write actor rules and event rules that decide whether a workflow may run at all, target them at particular workflow files, see their effect in an Insights view, and manage them through the REST API.

For public repositories without an applicable event policy of their own, GitHub has added a default policy that blocks pull_request_target. Today it runs in evaluate mode: workflows still run, and the insights show which runs would have been blocked. The dates that matter are:

Date (2026)What happens
17 SeptemberWorkflow execution protections generally available, including evaluate mode
21 OctoberGitHub moves enforcement from 2 November to 2 December, according to an editor's note on the GA announcement
9 November, 16:00 to 18:00 UTCFirst brownout: affected runs fail, with an error annotation
16 November, 16:00 to 18:00 UTCSecond brownout
2 DecemberEnforcement: affected workflows are blocked

According to the changelog, the default applies to public repositories on GitHub Free, Team and Enterprise Cloud. It does not apply to GitHub Enterprise Server. The reference documentation adds that it does not apply to private or internal repositories and does not replace an event policy you have already configured.

There is one difference in wording between the sources. The changelog describes the block as applying to public repositories in general. The documentation and the GA announcement's editor's note say enforcement on 2 December is for repositories "that were using the default pull_request_target policy before general availability". If you created a public repository after 17 September, check its policy insights rather than assume either reading.

Why GitHub is doing this

The reference page is unusually direct about the risk. A workflow triggered by pull_request_target runs with the base repository's GITHUB_TOKEN and its repository and organisation secrets, the same trust as a push by a collaborator. That is safe while the workflow only runs code from the default branch, which is what happens unless the author changes it.

The trouble starts when a workflow checks out the pull request's head and then runs anything from it. The documentation's example checks out github.event.pull_request.head.sha and then runs make test; the Makefile now comes from the fork. GitHub calls this a "pwn request" and says it has been the root cause of several supply-chain compromises. The same page notes that running code is not limited to obvious build steps: npm install, configuration files and dependencies brought in by the pull request can all execute what the attacker wrote.

The documentation also lists the less obvious shapes of the same mistake: setting the checkout repository to the fork, fetching the branch with git fetch or gh pr checkout, or downloading an artifact built by a fork's run and executing it. It points out that issue_comment and workflow_run workflows that fetch and run fork code have the same problem, and that the default block does nothing about those.

Why AI review automation is in the blast radius

Much of the automation that has appeared around pull requests in the past year needs exactly what pull_request_target provides: a token that can write comments or statuses on a fork's pull request, and a secret such as a model provider key. A review bot that reads the diff and posts comments, or an agent that proposes fixes, often runs this way in public repositories.

That kind of workflow is not unsafe by definition. If it only treats the pull request as data, reading the diff through the API and passing text to a model, no fork code runs. The risk appears when the workflow also installs dependencies, runs tests or builds the project from the pull request so that the agent has more context. At that point the provider key and the write token are within reach of anyone who can open a pull request. A text-only review step also carries prompt-injection risk, but that is a separate question from the one the default policy answers.

Deciding what to do with each workflow

GitHub's guidance amounts to three choices per workflow:

  1. Move to pull_request if the workflow does not need secrets. It runs on the same pull request activity, with a read-only token and no secrets for forks.
  2. Keep pull_request_target and allow it explicitly with an event policy, targeted at the specific workflow files that need it. The changelog points to workflow file targeting for this, so the exception covers named workflows rather than the whole repository.
  3. Leave the default in place and let the workflow stop on 2 December.

For workflows in the second group, the documentation sets out hardening steps that apply whether or not the workflow checks out pull request code:

  • Give the GITHUB_TOKEN the least permissions the job needs, and pass only the secrets it uses.
  • Expect the cache to be read-only. Runs triggered by pull_request_target can restore entries in the default branch's scope but cannot save them; declaring a write-capable cache-mode brings back the cache-poisoning risk.
  • Run on isolated, ephemeral runners. A self-hosted runner reused between jobs is a poor fit for this event.
  • Check for command injection from titles, branch names and other untrusted input.

There is also a second guard in actions/checkout. Checking out a fork's pull request head in this context requires the input allow-unsafe-pr-checkout: true, which the documentation says is "intentionally named to be easy to spot in code review and static analysis". It only covers fork refs fetched through the action; git fetch, gh pr checkout and downloaded artifacts are not checked.

Finding the workflows before the brownout

The quickest inventory is the policy insights view, under the repository's or organisation's Actions policy settings, which shows runs the default policy would block. A search of workflow files for pull_request_target across your organisation's public repositories gives the same list from the other end.

For each hit, it helps to answer two questions from the documentation: can this run on pull_request instead, and is any checked-out code ever executed? If the answer to the second is yes, the workflow is the kind the default exists to stop, and allowing it again should need more than one person's approval.

Note one limit for planning. The workflow execution protections page lists the evaluate status for policies you write yourself as GitHub Enterprise Cloud only. Teams on other plans can see the default policy's evaluation, but may not be able to trial their own replacement policy in evaluate mode before enforcing it.

What it means for engineering and security leaders

The default turns a long-standing piece of advice into a control. Most public repositories will notice nothing. The ones that will are those with fork-facing automation that needs secrets, and in many organisations those were added by individual maintainers rather than by a platform team.

Practical takeaways:

  • Inventory pull_request_target workflows in public repositories now, using policy insights or a code search.
  • Treat the brownouts on 9 and 16 November, between 16:00 and 18:00 UTC, as a test: a failed run with GitHub's error annotation in that window means the workflow will stop on 2 December.
  • Move workflows that do not need secrets to pull_request.
  • For the rest, write an event policy targeted at named workflow files, and review each one for checked-out code that runs.
  • Look at issue_comment and workflow_run workflows too. The default does not cover them, and the documentation says they can carry the same flaw.
  • Keep model provider keys used by review automation scoped and budgeted, because a workflow with access to them may be reachable from a fork.

Sources

  1. GitHub changelog: pull_request_target blocked by default starting December 2
  2. GitHub changelog: Workflow execution protections in GitHub Actions generally available
  3. GitHub Docs: Securely using pull_request_target
  4. GitHub Docs: Workflow execution protections
Cookie categories

Details: Cookie Policy.