GitHub Actions now blocks pull_request_target by default in public repositories
Since 2 December, workflows triggered by pull_request_target in public repositories only run if an Actions event policy allows them. Here is what changed, why, and how to check your site's workflows.
Since 2 December 2026, GitHub Actions blocks workflows triggered by pull_request_target by default in public repositories. A workflow only runs on that event if an Actions event policy explicitly allows it. If your site's code lives in a public GitHub repository and a workflow uses this trigger, check it now.
What changed
GitHub first announced the change on 2 November. It added a default rule through what it calls workflow execution protections. The rule ran in evaluate mode first, so workflows kept running and repository owners could see which runs it would block. GitHub then ran two brownouts, on 9 and 16 November, when the rule was enforced for two hours each.
On 2 December, GitHub posted a reminder that enforcement was starting that day, as planned. From then on, in affected public repositories, a pull_request_target workflow is blocked unless an applicable event policy allows it.
The change applies to public repositories on GitHub Free, GitHub Team and GitHub Enterprise Cloud. It does not apply to GitHub Enterprise Server. Private and internal repositories are not affected. If you have already set up an event policy that applies to a repository, that policy still applies.
Why GitHub is doing this
A workflow triggered by pull_request_target runs in the context of the base repository. It gets the base repository's GITHUB_TOKEN and access to its secrets. By default, it runs the workflow file and checks out code from the base repository's default branch, not from the pull request. In that form no code from the fork runs, which is why it is safe by default.
The risk comes when a workflow is changed to run the fork's code. GitHub's documentation gives a common example: a workflow points actions/checkout at the pull request's head commit, then runs a build or test command. That command now runs files from the pull request, such as a Makefile, a build script or a dependency, with the base repository's secrets and token. Anyone who can open a pull request from a fork can put commands in those files.
GitHub calls this pattern a "pwn request" and says it has been the root cause of multiple supply-chain compromises. Its documentation lists other shapes of the same mistake:
- Checking out a pull request's head or merge commit, then building, testing or running it.
- Setting the checkout's repository to the fork, to pull the fork's branch directly.
- Fetching the pull request's code some other way, for example with
git fetchor by downloading an artifact from a fork's run, and then running it.
GitHub also notes that the problem is not unique to this trigger. Any workflow that runs with secrets, such as one started by issue_comment or workflow_run, is at risk in the same way if it fetches and runs code from a fork.
What you can do
GitHub gives three options for each workflow that uses the trigger:
- Switch to a safer event. If the workflow does not need
pull_request_target, change it topull_requestwhere that works. Thepull_requestevent runs fork code with a read-only token and no access to other secrets. - Allow it explicitly. If the workflow must keep using
pull_request_target, create or update an Actions event policy that allows it. You can scope the policy to specific workflow files. GitHub says to do this only after confirming the workflow will not run untrusted pull request code with access to secrets or a privileged token. - Leave the default in place. If you do not want the trigger, keep the default policy and the workflow will stay blocked.
To find affected workflows, GitHub points to Policy insights, which shows workflow runs the policy blocked.
What it means for your site
- If your site deploys from a public GitHub repository, search its
.github/workflowsfolder forpull_request_target. Any workflow that uses it now stops running for pull requests unless you allow it. - If a preview, label or comment workflow stopped working this week, this change is a likely cause. Check Policy insights before changing anything.
- Before you allow the trigger again, read the workflow line by line. If it checks out the pull request's code and then runs a build, test or install step, do not allow it as it is. Move that work to
pull_request, where it runs without your secrets. - Keep deploy keys and hosting tokens out of reach of fork code. A workflow that can see your deploy credentials should only ever run code from your own default branch.
- Private repositories are not affected by this change, but the same rules for handling untrusted code still apply to them.