View : 119

17/11/2026 00:00am

3D illustration of a hooded figure holding a box in front of a half-open safe with a golden key on a pedestal, standing for a repo secret, with the date December 2, 2026 when GitHub blocks it by default and November 16, 2026, the next blocking rehearsal

What Is pull_request_target, and Why Is GitHub Blocking It in Public Repos From December 2, 2026?

#pull_request_target

#GitHub Actions

#GitHub Actions security

#CI/CD

#GitHub

Imagine you own a public repository on GitHub. One day a stranger sends a Pull Request (PR) from their fork, and your workflow wakes up and runs by itself, before you have read a single line of their code.

If that workflow uses the trigger called pull_request_target and pulls the stranger's code to run it, the question to ask is whether that code can see your repo's secrets. GitHub decided this risk is big enough to change the default behavior of Actions. Today Superdev Academy walks through what the trigger is, which dates you need to know, and how to check your own repo.

If you only maintain private repos, read the "Who is affected" section first, because this may not concern you at all.

What pull_request_target does, and how it differs from pull_request

As GitHub explains in its changelog announcement, pull_request_target runs in the context of the base repository, meaning the destination repo that receives the PR, and it can access that repo's secrets. If it runs untrusted code from a fork, that code could damage your pipeline or steal secrets.

The ordinary pull_request trigger, by contrast, generally does not give a fork's PR the secrets of the destination repo. That makes it the safer choice for code you do not trust, and it explains why people reach for pull_request_target when a workflow needs more privileges, such as commenting on or labeling a PR from a fork.

The dangerous pattern is mixing the two. Here is a hypothetical example we wrote for teaching (it is not from a real project).

on: pull_request_target

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.sha }}
      - run: npm install && npm test

The ref line checks out code from someone else's PR, and the last line runs it. All of this happens in a context that can reach our repo's secrets. Anyone who edits package.json in a PR to include a strange script has a chance to run their own commands on our pipeline.

Dates to know

The information in this section comes from GitHub's changelog dated November 2, 2026, and it is a schedule for a limited period. Dates can change again, so check the source before you plan.

  • December 2, 2026: GitHub Actions will block the pull_request_target event by default in all public repositories. It was first scheduled for November 2 and then postponed.

  • November 9 and 16, 2026, 16:00 to 18:00 UTC (23:00 to 01:00 the next day in Thai time): blocking rehearsals, which GitHub calls brownouts. During these windows, runs that would be blocked fail with an error annotation and the workflow does not run.

  • Outside the brownout windows: the rule is in evaluate mode, so workflows still run normally with a warning, and you can see which runs would be blocked once the rule is enforced.

As of this writing (November 12, 2026), the November 9 round has passed. The November 16 round and the enforcement date of December 2 are still ahead.

Who is affected

The rule applies to public repositories only. GitHub states that private and internal repositories are not affected, and the rule applies to the GitHub Free, Team and Enterprise Cloud plans, but not GitHub Enterprise Server.

An exception applies when an Actions event policy explicitly allows this trigger, which we cover in the next section.

If you are a student with a public repo for your portfolio and you once copied a workflow file from another project, take a look. A copied file may carry this trigger along without you noticing.

Check your repo in three steps

Step 1: Find which workflows use this trigger

Open a terminal in your repo folder and run this command.

grep -rn "pull_request_target" .github/workflows

If nothing comes back, the repo has no workflow file using this trigger, and the new rule does not affect you.

Step 2: See which runs GitHub will block

GitHub recommends opening the Insights page to see which runs would be blocked once the rule is enforced. Because the rule is in evaluate mode right now, you can see the effect in advance without anything breaking.

Step 3: Choose one of two paths

GitHub gives you two options. The first is to let the rule keep blocking, which suits a workflow that is no longer needed or that can switch to pull_request. The second is to explicitly allow pull_request_target through an Actions event policy, choosing only the workflow files that need it (workflow file targeting). The setup details are in GitHub's control workflow execution documentation.

But our workflow is already safe

That objection is reasonable. If your workflow never runs code from a fork and only adds a label or posts a comment, the risk from this channel drops a lot. Many projects have used the trigger that way for years without trouble.

But GitHub chose to block at the trigger level, not to inspect each workflow file. That means even a safe workflow has to ask for explicit permission. It is a one-time setup task, and a good chance to review whether the file still does what we think it does.

If you want the big picture of how GitHub Actions works from the start, we wrote about it in CI/CD คืออะไร เริ่มทำ Pipeline แรกด้วย GitHub Actions (in Thai), and our team branching guide is in GitHub Workflow 2026 (also in Thai).


Summary: check your workflows before December 2

pull_request_target runs in the context of the destination repo, which can access secrets, so it is dangerous when it runs code from a fork. From December 2, 2026, GitHub Actions will block this trigger by default in public repositories, while private repositories are not affected. Right now you can see the effect in advance on the Insights page, because outside the brownout windows the rule is still in evaluate mode.

Start with one command that takes under a minute: grep -rn "pull_request_target" .github/workflows. If you find a file, decide whether to switch it to pull_request or allow it explicitly, and you will not have a workflow fail halfway on the day the rule is enforced.

If you want to get fluent with branches, Pull Requests and code review, take a look at the Git & GitHub Essentials course from Superdev Academy. It runs 2 hours across 42 lessons, is taught in Thai, and comes with course materials and a certificate, with 12 months of access. It covers everyday Git and GitHub fundamentals, not GitHub Actions specifically. Browse all courses at learn.superdevacademy.com/courses.

🎯 Follow dev knowledge from Superdev Academy:

FAQ: Frequently Asked Questions about This Article

A collection of questions and answers to help you better understand the content of this article.