→ Back to Home
GitHub Actions

GitHub Actions Bolsters Supply Chain Security by Default Blocking 'pull_request_target' Workflows

As of December 2, 2026, GitHub Actions has implemented a critical security enhancement: `pull_request_target` workflows in public repositories are now blocked by default. This change applies unless an explicit GitHub Actions event policy is configured to allow them. This enforcement is a direct response to the inherent risks associated with `pull_request_target` workflows, which run in the context of the base repository and can access its secrets, making them a prime target for attackers submitting malicious code from forks. Private and internal repositories are not affected by this default block, and existing applicable event policies will continue to apply. This development is highly significant for anyone involved in open-source development and CI/CD security. The `pull_request_target` event, while useful for certain automation scenarios like labeling pull requests or running static analysis, has long been identified as a potential security loophole. Malicious actors could submit a pull request from a forked repository containing code designed to exfiltrate secrets or inject vulnerabilities into the build pipeline, leveraging the elevated permissions of the `pull_request_target` workflow. By making the blocking of these workflows the default behavior, GitHub is shifting the burden of security from reactive mitigation to proactive prevention. This forces maintainers to consciously evaluate the security implications before granting such powerful access, thereby hardening the software supply chain against a common attack vector. This move by GitHub aligns perfectly with the broader industry trend towards enhanced software supply chain security and a "shift-left" approach to security. Over the past few years, there has been a growing recognition of CI/CD pipelines as critical infrastructure and a significant attack surface. Incidents targeting CI/CD automation itself, rather than just the software it builds, have highlighted the need for more robust controls. This includes initiatives like the SLSA framework and increased scrutiny on how third-party dependencies and external contributions are handled within automated workflows. GitHub's 2026 roadmap, for instance, explicitly focuses on securing GitHub Actions across the ecosystem, attack surface, and infrastructure, aiming to make secure behavior the default. The blocking of `pull_request_target` by default is a concrete step in this direction, complementing other efforts to introduce more deterministic dependencies, centralized policies, and real-time observability for CI/CD runners. In practice, developers and repository maintainers of public projects need to immediately review their GitHub Actions configurations. If your workflows rely on `pull_request_target` for legitimate purposes, you must now create or update an applicable GitHub Actions event policy to explicitly allow it. It is crucial to scope these policies to specific workflow files and to thoroughly verify that the workflow will not execute untrusted pull request code with access to secrets or a privileged token. For workflows that don't strictly require the elevated permissions of `pull_request_target`, consider migrating to safer events like `pull_request` where appropriate. Failure to do so will result in these workflows being blocked, potentially disrupting your CI/CD processes. This change serves as a strong reminder for all practitioners to regularly audit their CI/CD configurations and adopt a security-first mindset when dealing with external contributions and automated workflows.
#github actions#security#supply chain security#ci/cd#pull_request_target#devops
Read original source