Codiatech Blog

GitHub Actions Restricts pull_request_target in Public Repositories

Find workflows affected by GitHub Actions' public repository policy and verify fork PR checks separately from jobs that need base repository permissions.

A theater stagehand closes the door between the foyer and backstage.

Starting December 2, GitHub Actions blocks workflows triggered by pull_request_target by default in affected public repositories. Those workflows can still run where an applicable event policy explicitly allows them. If you maintain a repository that accepts outside contributions, start by identifying the checks that were blocked. Then look at what permissions each job actually needs. GitHub enforcement update

Which Repositories Are Affected?

The change covers affected public repositories on GitHub Free, Team and Enterprise Cloud. Private and internal repositories are outside its scope. Existing applicable event policies continue to apply. The security consideration is that the event runs in the base repository's context and can access its secrets. Any workflow that runs untrusted contribution code with those privileges needs a different permission boundary.

Check Merge Requirements and Permissions Together

Review blocked runs in Policy insights. Match each entry to its workflow file and any required status check for merging. That gives you a way to tell which workflow changes are needed to restore the contribution process. GitHub event policy guide

A wardrobe technician examines the hem of a dark jacket on a dress form.

  • Build and test: Move suitable jobs to pull_request. Use a test contribution to confirm that the job starts, reports the required status and has no access to secrets or write permissions it doesn't need.
  • Repository operations: If a job needs base repository permissions, for example to apply labels, keep it separate from tests that run contributor code. Where pull_request_target remains necessary, confirm that untrusted code stays out of the privileged context and scope the allowance to the workflow file.

Verify the transition in one small repository first. Record whether the required merge checks completed and whether outside contributions stayed within the intended permission boundaries.

See Codiatech's cloud services and management for CI/CD work that connects repository policy with testing and deployment responsibilities.

Primary source: blog.github.com