Skip to content
audiotale.net
Sign in
NewsNews

GitHub blocks pull_request_target by default from 2 December 2026: how to fix broken workflows

GitHub Actions now blocks pull_request_target in public repositories unless a policy allows it; here is who is affected, how to check, and the three ways to fix a stopped workflow.

audiotale.net team

· 8 min read

Written by AI from the sources linked below. How we use AI

On this page
  1. Key points
  2. What to do
  3. What happened
  4. Background
  5. How it works
  6. What it means
  7. What we don't know yet
  8. What to watch next
  9. Sources

GitHub began blocking pull_request_target workflows by default in public repositories on 2 December 2026. If one of your public repositories runs a workflow with that trigger and no Actions event policy explicitly allows it, the workflow no longer runs. The change targets one of the best-known ways to steal secrets from open source CI, but it can also break legitimate automation such as labelers, greeters and coverage bots that maintainers set up years ago.

Key points

  • From 2 December 2026, GitHub Actions blocks pull_request_target by default in public repositories unless an applicable Actions event policy allows it (GitHub changelog, 2 December 2026).
  • Private and internal repositories are not affected, and neither is GitHub Enterprise Server; the change covers public repositories on GitHub Free, Team and Enterprise Cloud.
  • An event policy you already configured still applies; the default only fills the gap where none exists.
  • To keep a workflow running, either switch it to pull_request or add a policy that allows pull_request_target, optionally scoped to specific workflow files.
  • Enforcement was first planned for 2 November 2026 and moved to 2 December; GitHub ran two blocking test windows, on 9 and 16 November.

What to do

Who is affected: maintainers of public repositories whose workflows use on: pull_request_target. Most visible are bots that comment on, label or triage pull requests from forks, and CI that needs secrets for fork pull requests.

How to check: search your workflow files for the trigger (for example grep -rn "pull_request_target" .github/workflows), then open the repository's Settings, then Actions, then Policies, and look at the policy insights GitHub provides. Insights show which runs the default rule would block or has blocked. For an organization, the same Policies page exists at organization level, and GitHub documents a REST API for managing policies at scale.

How to fix it, in order of preference:

  1. Use pull_request instead if the workflow only needs to build or test the proposed change and does not need secrets or a write token. GitHub's documentation says pull_request triggers on the same events as pull_request_target and runs fork pull requests with safe restrictions.
  2. Split the workflow. Where you need secrets, keep the part that handles untrusted code (build, test) in a pull_request workflow with no secrets, and put the privileged part (commenting, labeling) in a separate workflow that treats everything from the first one as untrusted data.
  3. Allow it deliberately. If the workflow must keep using pull_request_target, create or update an Actions event policy that explicitly allows it. GitHub's workflow file targeting lets you allow specific workflow files rather than the whole repository.
  4. Leave it blocked if you no longer need the workflow. That is the default outcome.

GitHub's own warning applies to option 3: only allow the event after confirming the workflow does not check out, build or run code from an untrusted pull request while it has access to repository secrets or a privileged GITHUB_TOKEN.

What happened

GitHub's changelog entry of 2 December 2026 says enforcement begins that day: workflows triggered by pull_request_target in affected public repositories are blocked unless an applicable event policy explicitly allows them. The post is a reminder of a change announced on 2 November, and GitHub says the date has not changed again. It lists the fixes above and links to the documentation page on securely using pull_request_target.

The rule had been running in "evaluate mode" since the feature became generally available, which means workflows ran normally while GitHub recorded which ones would have been blocked. Repository owners could read those results in Insights. Before permanent enforcement, GitHub also ran two scheduled brownouts, on 9 November and 16 November 2026, each from 16:00 to 18:00 UTC. During those windows, blocked attempts produced failed runs with an error annotation instead of executing; afterwards the rule returned to evaluate mode.

There is a small difference in wording between GitHub's pages that affects who gets hit. The November changelog says GitHub will block the event "by default in all public repositories, unless an applicable Actions event policy explicitly allows" it. The Actions documentation and the September announcement describe the default policy as applying to public repositories "that do not already have an applicable event policy", and say that on 2 December GitHub will automatically enforce the default rule for affected repositories that were using the default policy before general availability. Either way, a repository with its own applicable policy keeps that policy. If you are unsure which category you are in, check Policy insights rather than assuming.

Background

pull_request_target was created so that workflows could do useful, privileged work on pull requests from forks. Unlike pull_request, it runs the workflow definition from the base repository's default branch, with access to the base repository's secrets and a read and write token. GitHub's documentation notes that because only trusted code from the default branch runs, this is safe by default: no code from the fork is executed.

The danger starts when a workflow author overrides that default. The documentation's example of an insecure pattern checks out the pull request head with actions/checkout and then runs make test, so a Makefile (or build script, dependency or config file) from the fork runs with the base repository's secrets. GitHub calls this a "pwn request" and says it has been the root cause of multiple supply-chain compromises. It lists three common shapes: checking out the pull request head or merge commit and then building or running it; pointing the checkout at the fork's repository; and fetching pull request code by other means, such as git fetch, gh pr checkout or a downloaded artifact, and then running it. The documentation adds that issue_comment and workflow_run workflows can create the same flaw.

GitHub has been tightening this in stages during 2026:

  • 18 June 2026: actions/checkout v7 became generally available and refuses common pwn request patterns by default. In pull_request_target workflows (and workflow_run workflows triggered by pull request events) it refuses when the pull request is from a fork and the checkout would fetch the fork's head or merge commit, or the fork's repository. GitHub planned to backport the refusal to supported older major versions; the post's editor's note moved that enforcement to 20 July 2026, and says v1 does not receive the change. Workflows pinned to a specific SHA, minor or patch version are not affected by the backport.
  • 17 September 2026: workflow execution protections reached general availability, with actor rules, event rules, workflow file targeting, Insights and a REST API. That announcement introduced the default rule for pull_request_target and said enforcement would come on 2 December; an editor's note dated 21 October moved the date to 2 December.
  • 2 December 2026: the default rule is enforced.

How it works

Two separate protections now stack, and it helps to know which one you are hitting:

Layer What it does Opt-out
Default event policy (this change) Stops a pull_request_target workflow from running at all in a public repository An event policy that allows it, optionally for specific workflow files
actions/checkout v7 and backports Fails the checkout step when a fork's head or merge commit would be fetched in a privileged event The allow-unsafe-pr-checkout input on the checkout step

GitHub says the opt-out flag is "intentionally named to be easy to spot in code review and static analysis". Treat both opt-outs as deliberate security decisions.

GitHub is also clear about what these protections do not cover. The checkout change does not block pwn requests built another way, such as a run step that uses git or the gh CLI to pull untrusted code and then executes it, and it does not block checking out an unrelated third-party repository. Pwn requests in other events, such as issue_comment, are also outside it. A workflow that is allowed by policy but runs fork code is exactly as dangerous as before.

What it means

For maintainers of small open source projects, the practical effect is a one-time audit. Many repositories adopted pull_request_target for a label or greeting bot years ago and never revisited it. Those that simply need to comment or label can often be rewritten around pull_request plus a follow-up workflow, or allowed by a narrowly scoped policy.

For larger projects, the policy route is the realistic one: coverage uploads, deployment previews and tests that need a private registry are the use cases GitHub itself names as legitimate reasons to keep the trigger. GitHub's guidance for these is to restructure so that fork code is never executed in the same job that holds secrets.

For security teams, the change moves the default for public repositories from "allowed unless you restrict it" to "blocked unless you allow it", which turns the list of allowed workflows into something auditable. Because policies can be set at enterprise, organization and repository level and managed through an API, an organization can keep an inventory of every workflow that was explicitly allowed.

What we don't know yet

  • GitHub has not published how many repositories or workflow runs the rule affects. The only figures in its posts are dates.
  • The exact scope wording differs between the changelog and the documentation (see above). GitHub has not said whether any public repository with no policy and no prior use of the default will be treated differently.
  • The documentation says blocked workflows are blocked after enforcement; the detailed description of failed runs with an error annotation comes from the brownout notice. We have not verified how a blocked run is displayed after permanent enforcement.
  • We did not find independent reports yet on how enforcement is going in practice on the first day.

What to watch next

GitHub has been shipping several platform deadlines at once. Our earlier coverage of OAuth redirect URI fragments being rejected from 1 February 2027 and the upcoming organization limits from 5 January 2027 covers other changes that may need action. Watch the Policy insights page for repositories you maintain over the next days, since runs that were only warnings during evaluate mode now stop. Also watch for GitHub extending similar default protections to other privileged events such as issue_comment; the company said in June that "further hardening of additional events may be explored in future releases".

Sources

Written by

audiotale.net team

The official account of the people who run audiotale.net: announcements, conversation starters and the newsroom's drafts. Posts written with AI say so. Every other account here is a real person.