GitHub Actions now blocks pull_request_target by default: what to check

Published on
• read
GitHub Actions now blocks pull_request_target by default: what to check
Photo by Jakub Żerdzicki on Unsplash

GitHub’s default block for pull_request_target workflows in affected public repositories took effect on December 2, 2026. If you maintain GitHub Actions, I’d check the policy insights before changing workflows: the right fix depends on whether a job truly needs the event’s elevated trust, not just whether it handles pull requests from forks.

Who is affected

GitHub says the default policy applies to affected public repositories on GitHub Free, Team and Enterprise Cloud. Private and internal repositories are not affected. An applicable Actions event policy already configured for a repository also continues to apply.

The change matters because pull_request_target runs workflow code from the base repository and can provide its GITHUB_TOKEN and repository or organization secrets. That can be useful for tasks such as labeling or triage. The danger comes when a workflow then checks out and runs code supplied by an untrusted fork while those privileges are available.

This is an enforcement change, not a blanket ban. A workflow may stop running if it relied on the default policy, but an explicit applicable policy can still allow the event. GitHub points maintainers to Policy insights to find runs that are blocked or affected.

A safe first check

I’d review each affected workflow in this order:

  1. Find the use. Search workflow files for pull_request_target, then compare those files with the repository’s Policy insights. Check whether the workflow has actually been blocked since enforcement began.
  2. Ask whether the job needs elevated access. If it only needs ordinary CI and does not need secrets or a write-capable token, consider pull_request instead. That event is designed for fork contributions with restricted token permissions and no repository secrets.
  3. Trace what the workflow runs. Look beyond an obvious test command. A checkout of the pull request’s head followed by a build, test, install script or other execution can run attacker-controlled code. Downloaded artifacts and dependencies also deserve scrutiny.
  4. Allow narrowly, only if needed. If the workflow genuinely needs pull_request_target, use an applicable event policy scoped to the required workflow files where possible. Before allowing it, verify that untrusted pull-request code is never executed with secrets or a privileged token, and limit token permissions to what the job requires.

For example, a workflow that adds a label using trusted base-branch code may have a reason to keep the event. A workflow that checks out a fork’s branch and runs its test suite with access to a private package token should not simply be allowlisted; redesign the trust boundary first.

What not to assume

A blocked run does not by itself mean the repository is compromised, and the new default does not mean every repository or workflow is affected. Conversely, changing the trigger to pull_request_target plus an allow policy is not a reliable fix for broken CI if the workflow executes fork code with privileged access.

GitHub’s security guidance explains the distinction between the two events and the “pwn request” risk in detail. I’d use the enforcement as a prompt to audit what each workflow can access and execute, then make the smallest policy or workflow change that fits that job.

Sources

Published by Letterpad Newsroom. Daniel Weber is an editorial byline of Letterpad Newsroom.

Author
Daniel Weber
Daniel Weber

Daniel Weber is an editorial byline of Letterpad Newsroom.

Discussion (0)

Loading Related...
Subscribe