GitHub Enhances Actions Security to Prevent ‘Pwn Request’ Attacks

GitHub has implemented a significant security enhancement in its Actions platform by updating the ‘actions/checkout’ tool to block common ‘pwn request’ attack patterns. This update, effective June 18, 2026, aims to prevent malicious code execution that exploits the ‘pull_request_target’ workflow trigger.

The ‘actions/checkout’ tool, essential for integrating repository code into workflow runners, now defaults to refusing to fetch code from forked pull requests in ‘pull_request_target’ and certain ‘workflow_run’ workflows. This change is designed to mitigate risks associated with executing untrusted code with elevated privileges.

Specifically, the tool will block checkouts when the pull request originates from a fork and meets any of the following conditions:

  • The ‘repository’ parameter resolves to the fork’s repository.
  • The ‘ref’ parameter matches ‘refs/pull/number/head’ or ‘refs/pull/number/merge’.
  • The ‘ref’ parameter resolves to the head or merge commit SHA of the fork’s pull request.

Workflow authors can override this default behavior by setting the ‘allow-unsafe-pr-checkout’ flag to ‘true’ in ‘actions/checkout’. However, this opt-out should be used cautiously, as it reintroduces potential security vulnerabilities.

The ‘pull_request_target’ event is particularly sensitive because it runs in the context of the base repository’s default branch, granting access to secrets and a privileged ‘GITHUB_TOKEN’ with both read and write permissions. This setup can be exploited if untrusted code from a forked pull request is executed, leading to potential security breaches.

Recent incidents have highlighted the dangers of such vulnerabilities. For instance, the ‘s1ngularity’ campaign compromised multiple packages associated with the Nx build system by exploiting these workflow misconfigurations. Similarly, breaches in projects like PostHog, TanStack, and the Emacs package ‘kubernetes-el/kubernetes-el’ have underscored the need for stricter security measures.

By defaulting to block unsafe checkouts in ‘pull_request_target’ workflows, GitHub aims to fortify the security of its Actions platform and protect repositories from potential supply chain attacks. Developers are encouraged to review their workflows and adjust configurations as necessary to align with these new security standards.

This proactive measure by GitHub reflects a growing emphasis on securing the software supply chain. As attackers increasingly target CI/CD pipelines, such enhancements are crucial in safeguarding development environments. Developers should stay informed about such updates and implement best practices to maintain the integrity of their workflows.