On Wednesday, 2 December, GitHub Actions, the automation system built into GitHub, starts blocking the pull_request_target trigger by default in every public repository, unless an Actions event policy explicitly allows it. If you maintain public repositories, some workflow you rely on (a labeller, a "comment /test to run CI" bot, a preview deploy) may stop running that day. You have four days to find out which, and GitHub has given you a tool to do it without breaking anything first.

That is the bottom line from GitHub's changelog notice, published on 2 November. The Python Software Foundation (PSF), which stewards Python and the PyPI package index, has gone further: it has removed the risky triggers from its own GitHub organisations and enforced a policy on the pypi one, with the last few python repositories being migrated before that organisation follows. Its blog post and the longer technical guide on the Alpha-Omega blog, both by Mike Fiedler and Seth Larson, are the clearest playbook I have read for doing the same.

What changes on 2 December

GitHub's notice is short. From 2 December, pull_request_target events are blocked by default "in all public repositories, unless an applicable Actions event policy explicitly allows them." Private and internal repositories are not affected. The change covers GitHub Free, Team and Enterprise Cloud, but not GitHub Enterprise Server, the version companies run on their own machines.

The rule has been running in evaluate mode, meaning it records what it would block without blocking it, and GitHub ran two short brownouts on 9 and 16 November in which blocked runs actually failed. If a workflow of yours failed with an odd annotation on one of those afternoons (16:00 to 18:00 UTC), that was the preview.

To keep a workflow running, you allow pull_request_target for it in an event policy, using what GitHub calls workflow file targeting, so the exception applies to that one file rather than the whole repository. The details are in GitHub's control workflow execution documentation.

Who this is not for: if all your repositories are private, or you run GitHub Enterprise Server, nothing changes for you on Wednesday. The underlying risk still applies if you use these triggers, so the rest of the post is still worth a skim.

Why one trigger gets special treatment

When someone opens a pull request from a fork, the ordinary pull_request trigger runs their code with a read-only token and no secrets. pull_request_target looks almost identical in a workflow file and behaves very differently: it runs in the context of your repository, with a read/write token and access to your secrets. GitHub built it for chores like labelling pull requests from forks, where the workflow never touches the contributor's code.

The trouble starts when a workflow using it checks out the pull request's code and runs it anyway. Anyone with a GitHub account can open that pull request, and their code then runs with your credentials. GitHub's own security lab calls this a "pwn request".

The analogy I find most useful is a building with a delivery door and a staff door. pull_request is the delivery door: strangers can leave a parcel, and it gets inspected in a room with nothing valuable in it. pull_request_target is the staff door with the master key hanging inside. It is fine as long as only staff use it. A workflow that checks out a fork's code is propping that door open for the courier.

The PSF post makes the same point about a second trigger, issue_comment, which fires when anyone comments on an issue or pull request and runs with the repository's token and secrets. The usual failure is a workflow that pastes the comment text into a shell command, so a crafted comment becomes a command.

The incidents behind the change

Attackers have used this repeatedly. The PSF post lists three cases that put malicious packages on PyPI:

  • Ultralytics, December 2024. The project's workflows were compromised and its build cache poisoned, which shipped malicious releases. William Woodruff's analysis traces the entry point to a pull_request_target workflow.
  • LiteLLM and Telnyx, March 2026. Malicious releases followed an API token exposed through a compromised dependency, the Trivy security scanner. StepSecurity traced that compromise back to an exploited pull_request_target workflow.
  • elementary-data, April 2026. A comment-triggered workflow put comment text straight into a shell script. One crafted comment got a token with write access, and the project's own release pipeline published the result.

The PSF authors are careful to say these maintainers "weren't careless." The unsafe version of a workflow is often one line away from the safe one, which is exactly why a default block is easier to defend than another round of documentation.

The PSF method, in five steps

The Alpha-Omega guide describes an organisation-wide policy. Here is the short version, for an organisation on GitHub Team or Enterprise:

  1. Open the policy page. In your organisation, go to Settings, then Actions, then Policies, and create a new policy.
  2. Set it to Evaluate. In this mode the policy blocks nothing; it records what it would have blocked on the Policy insights page next to it.
  3. Target all repositories and restrict events. The guide's recommended allowed list is pull_request, push, release, repository_dispatch, schedule, workflow_dispatch and workflow_run. Its quick fix, if you want fewer surprises, is to allow every event except pull_request_target and issue_comment.
  4. Wait, then read the insights. The guide suggests leaving it long enough "to cover a release and your least frequent scheduled job." For most projects that is longer than four days, so start now and expect GitHub's default to cover pull_request_target in the meantime.
  5. Enforce. Then deal with the exceptions one workflow file at a time.

Two companion checks are worth running alongside. GitHub code search over .github/workflows paths in your organisation will find the trigger names, though it only searches default branches. And zizmor, an open-source linter for Actions workflows, flags these triggers and the injection patterns around them, one repository at a time.

On GitHub Free, organisation-wide policies are not available. The PSF post says you can apply the same policy one repository at a time, which means a new repository starts with no policy until someone adds one. Put that step in whatever checklist you use to create repositories.

What will break, and what replaces it

Removing these triggers is not free. Labellers, comment-driven test bots and anything that writes back to a pull request from a fork tend to depend on them. The Alpha-Omega guide's suggested replacements include checking whether plain pull_request is enough for a labeller or welcome bot, splitting work into an unprivileged pull_request job and a separate privileged follow-up, moving slash commands to workflow_dispatch, and using a GitHub App for bots that need to post. If you use a merge queue, remember to allow merge_group.

The guide also asks organisation owners not to do this "unilaterally and without warning." Tell maintainers what the policy will block before you enforce it. A security change that silently breaks someone's release on a Friday creates a reason to switch it back off.

The one thing to do this weekend

Create the event policy in Evaluate mode today, then open Policy insights on Tuesday, the day before GitHub's default takes effect, and read the list of workflows it would have blocked. That list is your Wednesday.