Skip to content
Adelmi

GitHub blocks pull_request_target by default: what to check

Since December 2, 2026, GitHub Actions blocks pull_request_target by default in affected public repositories. What changes and how to audit your workflows.

· Software Engineer3 min read

Lee este artículo en español

Subscribe via RSS

Since December 2, 2026, GitHub Actions blocks workflows triggered by pull_request_target by default in affected public repositories, unless an event policy explicitly allows them. If your team maintains a public repository with CI on GitHub, check today whether any workflow uses that event: if one does and nobody allowed it, it will stop running. If nobody maintains that automation, our software maintenance and support service can audit it.

The short version

  • The block applies to public repositories that have no event policy already governing pull_request_target.
  • Private and internal repositories are not affected, according to GitHub.
  • Enforcement was first scheduled for November 2; GitHub moved it to December 2 and tested the block with two two-hour windows, on November 9 and 16. The announcement does not give a reason for the date change.
  • If you still need the event, you can allow it with an event policy, even for specific workflow files only.

What is pull_request_target and why block it?

pull_request_target runs the workflow in the context of the base repository, with access to its secrets. That is what makes it useful (for example, to label or comment on pull requests from forks) and what makes it risky: GitHub's documentation calls it a "pwn request" when the workflow checks out and runs the fork's code with those privileges. The pull_request event, by contrast, runs with a read-only token and no other secrets.

How do I know if it affects me?

  1. Search for the event in .github/workflows/: grep -rn "pull_request_target" .github/workflows/.
  2. Check Policy insights in your repository's or organization's Actions settings: GitHub shows which runs are blocked there.
  3. Check whether your repository is public and had no applicable event policy. If it is private or internal, nothing changes.

What are your options?

OptionWhen it fits
Switch the workflow to pull_requestThe workflow needs no secrets or write permissions
Leave the block in placeThe workflow is unused or can wait
Allow the event with an event policyYou need it and confirmed it runs no untrusted code with secrets
Allow it for specific workflow files onlyYou want the exception as narrow as possible

GitHub warns to allow the event only after confirming the workflow will not run untrusted pull request code with access to secrets or a privileged token.

Best practices from the official docs

  • Use pull_request unless you really need the base repository's secrets.
  • If you check out fork code, treat it as data only: never execute it.
  • Keep GITHUB_TOKEN permissions and secrets to the minimum.
  • If you use self-hosted runners, make them isolated and ephemeral.

For business owners

This affects public repositories. If your company's code is private, nothing changes. If you publish open-source code, ask your team whether any workflow stopped running since December 2 and who is reviewing it.

Sources

  1. pull_request_target enforcement begins December 2 (GitHub Changelog, Dec 2, 2026) (accessed December 4, 2026)
  2. pull_request_target blocked by default December 2 (GitHub Changelog, Nov 2, 2026) (accessed December 4, 2026)
  3. Workflow execution protections in GitHub Actions generally available (GitHub Changelog, Sep 17, 2026) (accessed December 4, 2026)
  4. Securely using pull_request_target (GitHub Docs) (accessed December 4, 2026)
  • NewsCustom software

    52% of WordPress sites will run unsupported PHP on Jan 1

    52.24% of WordPress sites run PHP 8.2 or older, with no security patches from January 1. How to check your PHP version and which one to move to.

    David Hernandez· Software Engineer3 min read