Syntaxradar: Tech insights. Always ahead.

pull_request_target Blocked Dec 2: What to Fix on GitHub

GitHub will block the pull_request_target event by default in public repositories from December 2, 2026, unless an Actions event policy allows it. Private and internal repositories are not affected.

Abdul Rehman

Abdul Rehman

Founder and publisher · · 7 min read

Researched and drafted with AI tools. How we use AI

pull_request_target Blocked Dec 2: What to Fix on GitHub

The short version

Dec 2, 2026
Enforcement date
Nov 9 and 16
Brownouts scheduled
3 of 7
Routes checkout refuses (our count)

Why it matters: Before December 2, list every workflow using the trigger, move the ones that do not need secrets to pull_request, and allow only reviewed files by path.

On this page

GitHub will block pull_request_target by default in public repositories starting December 2, 2026. From that date, a workflow using that event will not run unless an Actions event policy explicitly allows it. The rule covers public repositories on GitHub Free, Team and Enterprise Cloud. Private and internal repositories are not affected, and neither is GitHub Enterprise Server.

The fix has three steps: find each pull_request_target workflow, decide whether it still needs the trigger, then move it to pull_request, allow that one file or leave it blocked. The reason is pull_request_target security: these jobs can reach your secrets while reacting to a stranger's pull request.

What changes on December 2, and who is affected?

As of November 28, 2026, GitHub's changelog sets permanent enforcement for Wednesday, December 2, with no hour given. The earlier date was November 2.

The block comes from workflow execution protections, a type of GitHub Actions policy that became generally available on September 17. They work as allowlists: actor rules decide who can trigger a workflow, and event rules decide which events can start it. For public repositories without an applicable event policy, GitHub added a default rule against the trigger. It began in evaluate mode, where runs continue while GitHub records which ones it would block.

The documentation adds two limits that the November changelog leaves out, and the September changelog uses the same narrower wording. The default does not replace an event policy you already configured, and it describes enforcement for affected repositories that were already on the default policy for this event before general availability.

GitHub scheduled two brownouts (short trial enforcements) for November 9 and November 16, from 16:00 to 18:00 UTC (11 a.m. to 1 p.m. US Eastern). It said blocked attempts in those windows would become failed runs with an error annotation, so check your history for those dates. A clean history proves little, since only workflows triggered inside a window could fail.

pull_request_target vs pull_request in GitHub Actions: what is the difference?

The two differ in where the workflow file comes from and what the job can reach. With pull_request, the file comes from the pull request's merge commit, so on a fork a stranger controls it and GitHub limits the job. With pull_request_target, the file comes from your default branch, so GitHub trusts it with your token and secrets.

For a pull request from a forkpull_requestpull_request_target
Workflow file comes fromPull request merge commitBase repository's default branch
Default checkoutMerge commitDefault branch
GITHUB_REFrefs/pull/NUMBER/mergeDefault branch
GITHUB_TOKENRead-onlyBase repository's token, which can have write access
Other secretsWithheldRepository and organization secrets reachable
Default rule from December 2Not targetedBlocked in public repositories unless allowed

The "no secrets" protection on pull_request applies to forks. According to GitHub Security Lab, a pull request from a branch in the same repository does get write permission and secrets.

Branch choice changed too. Since December 8, 2025, the privileged trigger always reads its workflow from the default branch, whatever branch the pull request targets, so a stale copy on an old branch no longer runs. The pull_request_target types of activity that fire by default are opened, synchronize and reopened.

pull_request_target timeline from the September 17 default rule to enforcement on December 2
pull_request_target timeline from the September 17 default rule to enforcement on December 2

What is the pull_request_target vulnerability?

It is a workflow design mistake known as a "pwn request". A job that holds your secrets checks out the pull request's code and then runs it. GitHub's documentation shows actions/checkout pointed at the pull request head commit, followed by make test. An attacker only has to open a pull request from a fork with a changed Makefile, and those commands run with your token and secrets.

Checking out the files does not execute them. A later step does, and it need not look like a build. The Security Lab notes that npm install alone can fire preinstall or postinstall scripts that a pull request introduced. Package installs carry related risk outside Actions too; Rust projects can delay newly published crates with the Cargo cooldowns added in Rust 1.100.

GitHub's docs list these common shapes:

  • Checking out the pull request head or merge commit, then building or testing it
  • Setting the checkout's repository: input to the fork
  • Pulling the code with git fetch, gh pr checkout or a downloaded artifact, then running it

The same flaw can sit in issue_comment or workflow_run jobs. GitHub's September changelog says pull_request_target flaws such as pwn requests are among the most commonly exploited in Actions workflows. A repository workflow is one way untrusted code reaches your secrets. A developer's own editor is another, covered in our Claude Code extension VSCode backdoor guide.

How to find every affected pull_request_target workflow

Start with Policy insights, which shows what the rule itself would block. In a repository or organization, open Settings, then Policies under Actions. The Policy insights page sits directly below. Enterprise owners go through the Policies tab, then Actions.

Plan coverage is unclear. GitHub's REST reference says evaluate mode is only available with GitHub Enterprise. A reply marked as the answer in a GitHub Community thread, posted November 13 by a user labelled Collaborator, says insights and evaluate mode shipped for all plan types. Open the page and see what your account gets.

Insights is built from runs, so search the files as well. On your default branch, run grep -rn "pull_request_target" .github/workflows. Across an organization, try the code search org:YOUR_ORG path:.github/workflows "pull_request_target". A second search in the code examples with this post flags lines that can pull in fork code.

Treat the results as a starting list. A text search can miss code that a repository script or a reusable workflow fetches, so open each matching file.

What actions/checkout refuses under pull_request_target: 3 routes refused, 4 left open
What actions/checkout refuses under pull_request_target: 3 routes refused, 4 left open

Which workflows should you allow, and which should you rewrite?

Allow the trigger only where a job needs a secret or write token and never executes pull request code. The verdicts below are our reading of GitHub's guidance.

What the workflow doesVerdictWhat to do
Labels, triages or comments without checking out PR codeIntended useAllow that file, trim permissions
Builds and tests with no secrets neededTrigger not neededMove to pull_request
Builds PR code, then comments or reports resultsSplit itBuild in pull_request, report from workflow_run
Reads fork files strictly as dataClose reviewConfirm nothing executes before opting out in checkout
Checks out the PR head and runs make, npm install or testsPwn requestDo not allow as written

In the split pattern, an unprivileged pull_request job builds the code and saves results as an artifact. A workflow_run job with write access reads them afterward. Treat that artifact as untrusted data, because the fork produced it.

To keep one file working, create a policy that targets its path, add an event rule that includes the trigger and set it to active. Because event rules are allowlists, include every event that file should accept. A policy with no workflow path covers all workflows, so allowing only pull_request_target there would shut out push and other events.

Our sample policy body follows the REST schema, but we have not run it on a live repository. The docs also do not spell out how a one-file policy affects the default rule for your other workflows, so check insights after saving.

Then harden what you keep: give GITHUB_TOKEN the fewest permissions, pass only needed secrets, isolate self-hosted runners and never reuse them between runs, and enable CodeQL for Actions. Check each of these on every workflow file you opt back in, because an allow policy restores the trigger and its access with it. Private code is worth that care: in our report on the 1Password breach, the company said source code from private repositories was copied.

SyntaxRadar calculation: how much does actions/checkout already stop?

Part of it. Since June 18, 2026, actions/checkout v7 has refused common fork checkouts in pull_request_target jobs, and in workflow_run jobs that follow pull request events. The block was backported on July 20 to supported older versions, excluding v1. Floating tags such as @v4 picked it up, while workflows pinned to a commit SHA, minor or patch release need an upgrade.

We counted the risky routes named in that changelog and in the docs, then marked which ones checkout refuses:

Route to untrusted codeRefused by checkout?
repository: set to the forkYes
ref: refs/pull/NUMBER/head or mergeYes
ref: the fork's head or merge commit SHAYes
git fetch or gh pr checkout, then runNo
Downloaded artifact, then runNo
Unrelated third-party repositoryNo
Other events, such as issue_commentNo

Our count: 3 of 7 routes are refused and 4 stay with you. The grouping is ours and says nothing about how often attackers use each route. Setting allow-unsafe-pr-checkout: true turns the refusal off, so search for that string too.

We also counted the runway: 76 days from the September 17 rollout to December 2, including a 30-day slip from the first date, with 4 hours of scheduled brownout enforcement along the way.

What to watch when the block takes effect

On December 2, watch pull requests for runs that fail because the event is not allowed. GitHub says disallowed runs fail with an error, and its example message names both the event and the workflow file. Check labelers and triage bots in particular, since these are the jobs the trigger was built to serve.

As of November 28, we found no changelog entry after November 2 that moves the date. Before then, sort each pull_request_target workflow into allow, move or split, and write a file-scoped policy only for those that earn it.

In code

find-workflows.sh
# Run from the repository root, on the default branch
grep -rn "pull_request_target" .github/workflows

# Lines that can pull in code from a pull request
grep -rnE "pull_request\.head|refs/pull/|gh pr checkout|git fetch|download-artifact|allow-unsafe-pr-checkout" .github/workflows
The first search lists workflows the default rule can affect. The second flags lines to read closely; a match is not proof of a flaw, and no match is not proof of safety.
policy.json
{
  "name": "Allow pull_request_target for labeler",
  "enforcement": "active",
  "conditions": {
    "workflow_path": {
      "include": [".github/workflows/labeler.yml"],
      "exclude": []
    }
  },
  "rules": [
    {
      "type": "restrict_action_events",
      "parameters": { "allowed_events": ["pull_request_target"] }
    }
  ]
}
Built from GitHub's REST schema and not run by us. It limits labeler.yml to this one event, so add any other event the file uses and change the path to yours.
apply-policy.sh
gh api --method POST repos/OWNER/REPO/actions/policies \
  -H "X-GitHub-Api-Version: 2026-03-10" \
  --input policy.json
Creates the repository policy. The REST reference requires Administration write permission on the repository.

Questions readers ask

Will pull_request_target GitHub Actions workflows stop running on December 2?

In affected public repositories, yes, unless an applicable Actions event policy allows the trigger. GitHub's changelog covers public repositories on Free, Team and Enterprise Cloud. Without such a policy, the default rule blocks the run. The changelog gives the date, December 2, 2026, but no hour.

Are private repositories affected by the new default block?

No. GitHub says private and internal repositories are not affected by this default rule, and the change does not apply to GitHub Enterprise Server. A privileged workflow in a private repository can still be written unsafely, so the checks on checking out and running pull request code remain worth doing.

Can I still use pull_request_target after December 2?

Yes. Create or update an Actions event policy that explicitly allows it, ideally limited to named workflow files. GitHub's guidance is to allow it only when necessary, and such workflows should not check out, build or run untrusted pull request code with access to secrets or a privileged token.

Does actions/checkout v7 solve the pull_request_target security problem?

Only partly. It refuses to check out fork pull request code in the common ways, and the change was backported to supported older versions. Code pulled in with git or the gh CLI, downloaded artifacts, unrelated repositories and events such as issue_comment are outside that protection, so review those yourself.

Sources

  1. github.blog
Abdul Rehman

Written by

Abdul Rehman

Founder and publisher at Syntaxradar. More in Developer Tools.

Keep reading

More in Developer Tools

See all

The tech that matters, in your inbox.

The day's best stories and why they matter, in one short email. Free, unsubscribe anytime.

Latest stories

Front page