GitHub is changing how one of its riskiest workflow triggers behaves. Starting December 2, 2026, workflows triggered by pull_request_target are blocked by default in public repositories unless an Actions policy explicitly allows them. Before that date GitHub is running two short brownouts, so some maintainers will see failed runs earlier than they expect.
This guide covers what is changing, who is affected, how to find the workflows that will break, and how to choose between allow-listing a workflow and rewriting it to avoid the trigger.
What exactly is changing
GitHub announced the change on its changelog on November 2, 2026. It is built on workflow execution protections, a feature that became generally available in September 2026. Those protections let administrators define rules about which events may start a workflow and which actors may trigger it. GitHub is now adding a default event rule for public repositories that disables pull_request_target when no other applicable policy allows it.
The key dates (all UTC):
| Date | What happens |
|---|---|
| November 9, 2026, 16:00–18:00 | Brownout 1: blocked workflows create failed runs with an error annotation and do not execute |
| November 16, 2026, 16:00–18:00 | Brownout 2: same behaviour |
| December 2, 2026 | Permanent enforcement begins |
Outside the brownout windows, the rule stays in evaluate mode until December 2: workflows still run, but GitHub records warnings for the runs it would have blocked. Enforcement was originally planned for November 2 and was pushed back by a month.
Who is affected
- Affected: public repositories on GitHub Free, GitHub Team and GitHub Enterprise Cloud that have workflows using
on: pull_request_targetand no policy that allows it. - Not affected: private and internal repositories, and GitHub Enterprise Server.
- Not replaced: if your repository, organization or enterprise already has an applicable event policy, the new default does not override it.
There is no YAML setting that turns the trigger back on. The decision lives in repository, organization or enterprise settings.
Why GitHub is doing this
The pull_request event runs a fork’s code with a read-only token and no access to repository secrets. That is safe, but it also means a workflow cannot label a pull request from a fork or post an authenticated comment on it.
pull_request_target was added to solve that. It runs in the context of the base repository, using the workflow file from the default branch, with the base repository’s GITHUB_TOKEN and secrets. Used as designed, for example a labeler that reads only the list of changed files, it is fine. The problem is a pattern often called a “pwn request”: the workflow checks out the pull request’s head commit and then runs something from it, such as npm install, make test or a build script. The attacker controls that code, and it now runs with your secrets and a write-capable token.
GitHub’s own documentation shows this as the insecure example:
# INSECURE. Provided as an example only.
on:
pull_request_target:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Test
run: make test
Checking out the head SHA is not the dangerous part by itself. Running the fork’s Makefile is. Researchers have been warning about this class of bug for years, and it has been linked to real supply-chain incidents in popular open source projects.
How this relates to the actions/checkout v7 change
In June 2026, actions/checkout v7 started refusing the most common pwn-request checkouts by default: fork refs such as refs/pull/N/merge, the fork’s head SHA, or repository: pointing at the fork, under pull_request_target or a workflow_run triggered by a pull request. That fix was backported to older supported major versions in July. Workflows pinned to a floating tag like @v4 got it automatically; workflows pinned to an exact SHA or patch version did not.
The checkout change only blocks one way of pulling in untrusted code. It does not catch a run step that uses git fetch or gh pr checkout. The December change goes further and blocks the trigger itself.
Step 1: Find workflows that use pull_request_target
Start with a local search in each repository:
grep -rn "pull_request_target" .github/workflows/
If you maintain many repositories, the GitHub CLI can search across an organization. Code search only covers indexed default branches, so treat the result as a starting point rather than a complete inventory:
gh search code "pull_request_target" path:.github/workflows --owner your-org --limit 100
GitHub also provides a Policy insights page, found directly under the Actions policies page at the repository, organization or enterprise level. It lists runs that were blocked by an active policy, or would have been blocked by one in evaluate mode. During a brownout, affected runs also show up as failed runs with an error annotation, which is an unpleasant but reliable way to discover them.
While you have each workflow open, check whether it is also one of the dangerous ones. These are the lines to look for in a pull_request_target workflow:
grep -rnE "head\.sha|head\.ref|refs/pull/|head\.repo\.full_name|gh pr checkout|allow-unsafe-pr-checkout" .github/workflows/
A match is not automatically a vulnerability, but each one deserves a careful read.
Step 2: Decide what each workflow actually needs
Most workflows using this trigger fall into one of three groups.
It never needed the trigger
Some workflows use pull_request_target only because someone hit a “Resource not accessible by integration” error once and switched triggers. If the job just builds and tests code and does not need secrets or write access, change it to pull_request and set minimal permissions:
on:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: npm ci
- run: npm test
This is the cleanest outcome: fork code runs without secrets, and no policy exception is needed.
It needs write access but never runs pull request code
Labelers, triage bots and welcome-message workflows are the legitimate use case. The official actions/labeler README still recommends pull_request_target:
name: "Pull Request Labeler"
on:
- pull_request_target
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v6
A workflow like this does not check out or execute fork code, so the sensible choice is to keep it and allow it explicitly in a policy (Step 3). Keep the permissions block as tight as shown.
It needs secrets and the pull request’s code
This is the risky group, for example a workflow that builds a fork’s code and then posts a preview link or test summary using a token. The safer design splits it into two workflows: an unprivileged one that runs the untrusted code, and a privileged one that only handles the result as data.
The first workflow runs on pull_request, so fork code never sees secrets. It saves its output and the PR number as an artifact:
# .github/workflows/ci.yml
name: CI
on:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: npm ci
- run: npm test 2>&1 | tail -n 50 > summary.txt
- run: echo "${{ github.event.pull_request.number }}" > pr-number.txt
- uses: actions/upload-artifact@v7
with:
name: pr-result
path: |
summary.txt
pr-number.txt
The second workflow runs on workflow_run after CI finishes. It does not check out any code. It downloads the artifact, validates it, and posts a comment:
# .github/workflows/comment.yml
name: Comment results
on:
workflow_run:
workflows: ["CI"]
types: [completed]
permissions:
actions: read
pull-requests: write
jobs:
comment:
if: github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Download result
env:
GH_TOKEN: ${{ github.token }}
run: gh run download ${{ github.event.workflow_run.id }} -n pr-result -R ${{ github.repository }}
- name: Post comment
env:
GH_TOKEN: ${{ github.token }}
run: |
PR=$(cat pr-number.txt)
if ! [[ "$PR" =~ ^[0-9]+$ ]]; then
echo "Invalid PR number"; exit 1
fi
gh pr comment "$PR" -R ${{ github.repository }} --body-file summary.txt
Two details matter here. The artifact was produced by code the attacker controls, so everything in it is untrusted input: validate the PR number, and never execute anything from the artifact or interpolate it into a shell command. GitHub’s guidance says this directly about artifacts from other workflows. And workflow_run is a privileged event too, so the same “never run untrusted code” rule applies to it.
Step 3: Allow the workflows that must keep the trigger
Repository administrators, organization owners and enterprise owners can create policies. According to GitHub’s documentation, the feature is available for all public repositories and for private repositories on GitHub Team or GitHub Enterprise.
- For a repository or organization, open Settings, then under Actions in the sidebar click Policies. For an enterprise, open the Policies tab, then Actions, then Policies.
- Create a policy and give it a clear name, such as “Allow labeler on pull_request_target”.
- Target only the specific workflow file that needs the event, for example
.github/workflows/labeler.yml, using workflow file targeting. Avoid allowing the event for every workflow in the repository. - In the event rules, allow
pull_request_targettogether with the other events that workflow uses. - Check Policy insights afterwards to confirm the workflow is no longer flagged.
Evaluate mode for your own policies, which logs would-be blocks without enforcing them, is limited to GitHub Enterprise Cloud. On other plans a new policy is active as soon as you save it, so be precise with targeting. Policies can also be managed through the REST API for GitHub Actions policies, which is useful if you have many repositories to update.
Allow-listing should come after reviewing the workflow, not instead of it. If a file you are about to allow checks out fork code and runs it, fix that first.
A short checklist before December 2
- Search every public repository for
pull_request_target. - Move build-and-test workflows that do not need secrets to
pull_request. - For labelers and triage bots, keep the trigger, tighten
permissions, and allow that one file in a policy. - Split anything that needs both secrets and fork code into an unprivileged
pull_requestworkflow and a privilegedworkflow_runworkflow that only reads data. - Search for
allow-unsafe-pr-checkoutand make sure each use is a deliberate, reviewed decision. - Check workflows pinned to an exact SHA of an old
actions/checkoutrelease; they did not receive the June backport. - Watch the Actions tab during the November 16 brownout for anything you missed.
For most projects this is a small amount of work, and the result is a pipeline where a stranger’s pull request cannot reach your secrets. My recommendation is to treat the deadline as a reason to audit every privileged trigger in your workflows, not just to restore the ones that start failing.
Sources: GitHub Changelog: pull_request_target blocked by default December 2, GitHub Changelog: Workflow execution protections generally available, GitHub Changelog: Safer pull_request_target defaults for actions/checkout, GitHub Docs: Control workflow execution, GitHub Docs: Securely using pull_request_target, actions/labeler README, GitHub CLI manual: gh search code, Socket