Automation

GitHub Actions pull_request_target Blocked by Default on December 2, 2026: Migration and Policy Guide

Starting December 2, 2026, GitHub Actions enforces a default workflow execution policy that blocks pull_request_target in public repositories on GitHub Free, Team, and Enterprise Cloud. Here is how the privilege boundary works, what broke during the November brownouts, and how to migrate to a split pull_request and workflow_run pipeline.

By 0xScorPionSon

11 min read

GitHub Actions pull_request_target Blocked by Default on December 2, 2026: Migration and Policy Guide

Diagram showing GitHub Actions pull_request_target default block on December 2, 2026 and the privilege-separated pull_request to workflow_run split pattern

Executive Summary

  • Enforcement begins December 2, 2026: Following two scheduled brownout windows on November 9 and November 16, 2026 (16:00–18:00 UTC), GitHub Actions permanently activates a default workflow execution protection that blocks pull_request_target events in public repositories across GitHub Free, GitHub Team, and GitHub Enterprise Cloud unless an explicit Actions event policy permits them.
  • Scope and exemptions: Private repositories, internal repositories, GitHub Enterprise Server, and public repositories that already define an applicable Actions event policy are unaffected by the default block, according to GitHub's pull_request_target security documentation.
  • Two-part defense model: GitHub pairs the default event policy with a built-in actions/checkout protection that blocks checking out fork pull request head refs inside pull_request_target unless the workflow author explicitly sets allow-unsafe-pr-checkout: true.
  • Recommended migration path: Maintainers should audit affected workflows in Policy Insights and move untrusted fork builds to pull_request paired with a privilege-separated workflow_run job (maximum three chained workflow levels) that treats downloaded artifacts as untrusted data.

What Changed: The December 2, 2026 Default Policy

For years, pull_request_target has been the most frequent source of "pwn request" supply-chain compromises in open-source CI/CD pipelines. Because pull_request_target executes workflow definitions from the base repository's default branch while granting access to repository secrets, write-capable GITHUB_TOKEN permissions, and cache restoration, a single unsafe checkout of a fork's head SHA lets an external contributor run arbitrary build scripts with maintainer privileges.

On November 2, 2026, GitHub's Changelog announced that permanent enforcement of the default pull_request_target block—originally slated for November 2, 2026—would take effect on December 2, 2026. Before permanent enforcement, GitHub placed the rule in evaluate mode so maintainers could inspect Policy Insights without breaking builds, punctuated by two two-hour brownouts:

Milestone Date & Time (UTC) Behavior in Public Repositories
Evaluate mode rollout Prior to Dec 2, 2026 Workflows run normally; Policy Insights logs runs that would be blocked
Brownout window 1 Nov 9, 2026, 16:00–18:00 Blocked pull_request_target triggers create failed runs with error annotations
Brownout window 2 Nov 16, 2026, 16:00–18:00 Blocked pull_request_target triggers create failed runs with error annotations
Permanent enforcement Dec 2, 2026 onward All pull_request_target runs blocked unless explicitly allowed by an Actions event policy

How the Privilege Boundary Works

Understanding why pull_request_target differs from pull_request is essential before choosing between an event policy allowlist and a pipeline refactor. As documented in Events that trigger workflows:

  • pull_request (untrusted fork context): Runs against refs/pull/PULL_REQUEST_NUMBER/merge (the simulated merge commit). For forked repositories, GitHub restricts GITHUB_TOKEN to read-only permissions, withholds repository and organization secrets, and enforces fork approval policies for first-time contributors (including Dependabot pull requests, which GitHub treats as fork PRs).
  • pull_request_target (elevated base context): Runs against the base repository's default branch (GITHUB_REF = default branch, GITHUB_SHA = last commit on default branch). Because the workflow YAML comes from the trusted default branch, GitHub grants access to secrets and a privileged GITHUB_TOKEN, and runs even when the PR has merge conflicts.
flowchart LR
    A[Fork Pull Request Opened] --> B{Trigger Event}
    B -->|pull_request| C[Merge Ref Sandbox]
    C --> D[Read-Only Token / No Secrets]
    D --> E[Run Untrusted Tests & Upload Artifact]
    E -->|workflow_run completed| F[Trusted Base Context]
    F --> G[Validate Artifact as Data Only]
    G --> H[Post PR Comment / Status with Scoped Token]
    B -->|pull_request_target| I{Actions Event Policy}
    I -->|Default Dec 2, 2026| J[Blocked with Error Annotation]
    I -->|Explicitly Allowed| K[Base Branch Workflow + Read-Only Cache]

Even when a repository explicitly allows pull_request_target in an Actions event policy, GitHub's security reference enforces two additional guardrails:

  1. Read-only cache scope: Workflows triggered by pull_request_target can restore existing caches from the default branch scope but cannot create or overwrite cache entries. If a step attempts to save a cache, the save fails with a warning in the workflow log while the job continues. Overriding this with a write-capable cache-mode reintroduces cache-poisoning risks.
  2. actions/checkout fork protection: actions/checkout blocks checking out fork pull request head refs inside pull_request_target unless you explicitly pass allow-unsafe-pr-checkout: true. GitHub notes that this check only covers fork PR refs in actions/checkout—it does not protect against git fetch, gh pr checkout, checking out third-party repositories, or executing downloaded artifacts.

Core Mechanism: The Split pull_request + workflow_run Pattern

For most public repositories that used pull_request_target to run tests, collect coverage, or comment on fork pull requests, GitHub's Secure use reference recommends privilege separation using pull_request followed by workflow_run.

In this architecture, the first workflow runs on pull_request with zero secrets and a read-only GITHUB_TOKEN, builds or tests the untrusted fork code, and uploads a simple data artifact (such as a PR number, lint JSON, or coverage summary). The second workflow triggers on workflow_run (types: [completed]), runs in the trusted default-branch context, downloads the artifact into ${{ runner.temp }}, validates the parsed data strictly without executing anything inside it, and posts the PR comment or status check.

Below is a production-ready two-workflow implementation adapted from GitHub's workflow_run reference:

name: Unprivileged Fork Check
on:
  pull_request:
    types: [opened, synchronize, reopened]

permissions:
  contents: read

jobs:
  collect-metadata:
    runs-on: ubuntu-latest
    steps:
      - name: Save PR number as plain text
        env:
          PR_NUMBER: ${{ github.event.number }}
        run: |
          mkdir -p ./pr-meta
          echo "$PR_NUMBER" > ./pr-meta/pr_number
      - uses: actions/upload-artifact@v4
        with:
          name: pr_number
          path: pr-meta/

The second workflow consumes that artifact in a privileged context without ever checking out the fork's code into $GITHUB_WORKSPACE:

name: Privileged PR Commenter
on:
  workflow_run:
    workflows: [Unprivileged Fork Check]
    types: [completed]

permissions:
  actions: read
  issues: write
  pull-requests: write

jobs:
  comment:
    if: ${{ github.event.workflow_run.conclusion == 'success' }}
    runs-on: ubuntu-latest
    steps:
      - name: Download artifact outside workspace
        uses: actions/download-artifact@v5
        with:
          name: pr_number
          path: ${{ runner.temp }}/artifacts
          run-id: ${{ github.event.workflow_run.id }}
          github-token: ${{ secrets.GITHUB_TOKEN }}

      - name: Validate integer and comment on PR
        uses: actions/github-script@v8
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          script: |
            const fs = require('fs');
            const path = require('path');
            const raw = fs.readFileSync(
              path.join('${{ runner.temp }}/artifacts', 'pr_number'),
              'utf8'
            ).trim();
            const issueNumber = Number(raw);
            if (!Number.isInteger(issueNumber) || issueNumber <= 0) {
              throw new Error(`Invalid PR number artifact: "${raw}"`);
            }
            await github.rest.issues.createComment({
              owner: context.repo.owner,
              repo: context.repo.repo,
              issue_number: issueNumber,
              body: 'Automated checks passed.'
            });

Two implementation details here prevent common vulnerabilities:

  • Extracting artifacts into ${{ runner.temp }}/artifacts instead of $GITHUB_WORKSPACE ensures no untrusted file lands in the working directory where a subsequent step or tool configuration could execute it.
  • Validating Number.isInteger(issueNumber) before calling the REST API treats the artifact strictly as untrusted input, preventing injection or unexpected API targeting.

Reliability, Cost & Performance Analysis

Migrating from pull_request_target to either an explicit Actions event policy or a split pull_request + workflow_run architecture changes workflow latency, runner consumption, and operational governance.

1. Compute Overhead and Execution Latency

Running a single pull_request_target workflow uses one runner allocation and one queue wait. Splitting into pull_request plus workflow_run introduces a second job dispatch and an artifact round-trip (actions/upload-artifact@v4 followed by actions/download-artifact@v5). For lightweight comment or labeling bots, this adds one extra ubuntu-latest VM boot and teardown cycle per successful PR run—meaning slightly higher Actions minute consumption on private/metered orgs, though public repositories receive standard GitHub-hosted runner minutes free of charge.

Latency also depends on how you structure workflow_run filters. By default, workflow_run triggers on completed, requested, and in_progress if types is omitted; specifying types: [completed] and checking github.event.workflow_run.conclusion == 'success' avoids wasted runner boots on canceled or failed fork runs.

2. Chaining Limits and Event Payload Constraints

GitHub enforces strict orchestration boundaries on workflow_run and adjacent triggers in Events that trigger workflows:

  • Three-level chaining cap: You cannot chain more than three levels of workflows using workflow_run. In a sequence A -> B -> C -> D -> E -> F, GitHub will not trigger workflows E and F.
  • No re-run requested events: The requested activity type for workflow_run does not fire when a workflow is manually re-run.
  • Branch and file path traps: Unlike pull_request, workflow_run only triggers if the workflow file exists on the repository's default branch, and GITHUB_SHA / GITHUB_REF resolve to the default branch rather than the fork PR merge ref.
  • No merge-conflict execution on pull_request: Workflows triggered by pull_request do not run if the pull request has a merge conflict, whereas pull_request_target runs even on conflicted PRs. Teams relying on pull_request_target to auto-label conflicted PRs will see those labels delayed until conflicts are resolved if they migrate to pull_request.

3. Governance and Policy Layering

In Governing execution of GitHub Actions workflows, GitHub models Actions policies similarly to branch rulesets: enterprise owners can define broad, non-negotiable policies, while organization owners and repository administrators layer stricter rules on top.

Control Mechanism Where Configured Blast Radius & Trade-Off
Default pull_request_target block Automatic on public repos (Dec 2, 2026) Zero config; blocks all pull_request_target unless overridden
Actions Event Policy allowlist Settings > Actions > Policies (or Enterprise Policies) Can scope to specific repositories, custom properties, or workflow file paths
allow-unsafe-pr-checkout: true actions/checkout step input in YAML Permits fork ref checkout inside pull_request_target; visible in code review and CodeQL
Workflow dependency lockfiles Repository lockfile + Require lockfile policy Pins step-level uses: actions including transitive dependencies; blocks un-onboarded runs

Note that if you enable Require lockfile alongside pull_request_target event policies, Require lockfile covers step-level actions (jobs.<job_id>.steps[*].uses) and requires any called reusable workflow (jobs.<job_id>.uses) to be onboarded to the lockfile in its own repository.


Practical Implementation & Trade-Offs

Before December 2, 2026, repository maintainers and platform engineering teams should follow a four-step audit and migration workflow:

Step 1: Audit Policy Insights Before Enforcement

Navigate to Settings > Actions > Policy insights in your repository, organization, or enterprise sidebar (directly beneath Policies). Because GitHub has been running the default pull_request_target protection in evaluate mode, Policy Insights already lists every workflow run that would have been blocked—and any failures recorded during the November 9 and November 16 brownouts.

Step 2: Classify Each pull_request_target Workflow

For every workflow flagged in Policy Insights, classify it into one of three buckets:

  1. False-need pull_request_target (Migrate to pull_request): If the workflow only runs linters, unit tests, or builds without needing write tokens or repository secrets, switch on: pull_request_target to on: pull_request.
  2. Fork build + privileged feedback (Migrate to pull_request + workflow_run): If the workflow builds untrusted fork code and then posts a PR comment, uploads coverage to a private registry, or updates a commit status, split it into an unprivileged pull_request job and a privileged workflow_run job passing validated data via artifacts.
  3. Metadata-only triage (Keep pull_request_target with explicit policy): If the workflow strictly reads PR metadata (such as applying labels based on changed paths or PR title, or welcoming first-time contributors) and never checks out or executes fork code, keep pull_request_target, create an Actions event policy scoped to that exact workflow file path, and lock down permissions: to least privilege (for example, pull-requests: write only).

Step 3: Harden Remaining pull_request_target Workflows

If you must create an Actions event policy to allow pull_request_target for specific workflows, apply the full hardening checklist from GitHub's security documentation:

  • Use workflow file targeting: Rather than allowing pull_request_target across an entire organization or repository, scope the Actions event policy to the exact .github/workflows/<file>.yml path.
  • Avoid inline shell interpolation of PR fields: Never interpolate ${{ github.event.pull_request.title }} or branch names directly inside run: blocks; pass them through env: variables or into a JavaScript action argument to prevent script injection.
  • Never run self-hosted runners on public repos: Self-hosted runners are not guaranteed to be ephemeral VMs. Even with JIT runners (./run.sh --jitconfig), reusing underlying hardware risks exposing secrets or environment state across runs.
  • Enable CodeQL and OpenSSF Scorecards: Enable CodeQL for GitHub Actions to detect dangerous checkout and injection patterns automatically, and protect .github/workflows with CODEOWNERS so policy-exempt workflow files cannot be modified without security review.

Step 4: Verify Third-Party Action Integrity

Remember that any compromised third-party action in a privileged pull_request_target or workflow_run job inherits all secrets available to that job. Adopt GitHub Actions workflow dependency lockfiles or pin every uses: reference to a full-length 40-character commit SHA (and pair with Dependabot version updates so SHA-pinned actions still receive security patches).


Frequently Asked Questions

Does the December 2, 2026 pull_request_target block affect private or internal repositories?

No. According to GitHub's Changelog and security documentation, the default pull_request_target blocking policy applies only to public repositories on GitHub Free, GitHub Team, and GitHub Enterprise Cloud. Private repositories, internal repositories, and GitHub Enterprise Server instances are not affected.

What happens if my organization already configured an Actions event policy?

GitHub's default pull_request_target block does not replace an applicable Actions event policy that you have already configured. Only public repositories without an applicable event policy fall under the default block on December 2, 2026.

Can I still use actions/checkout with a fork PR ref inside pull_request_target?

Yes, if you both allow pull_request_target in an applicable Actions event policy and pass allow-unsafe-pr-checkout: true to actions/checkout. However, GitHub explicitly warns that you should only do this after verifying the checked-out code is inspected strictly as data and never executed—remembering that npm install, make, linters, and local config files can all execute attacker-controlled code.

Why did my pull_request_target workflow fail to save a dependency cache?

To prevent cache poisoning from untrusted pull requests, GitHub restricts pull_request_target workflows to read-only access on the default branch's cache scope. Restoring caches succeeds, but saving a new cache fails with a warning in the log (without failing the job). Populate caches from a trusted push workflow instead.

Is workflow_run automatically immune to pwn requests?

No. While workflow_run cleanly separates the unprivileged pull_request execution from your secrets, a workflow_run job can still introduce a pwn request if it checks out the fork's code or executes binaries, scripts, or configuration files downloaded from a pull_request artifact. Always download artifacts to ${{ runner.temp }} and parse them strictly as validated data.


Sources

More on Automation

Automation

Temporal November 2026 Release: External Storage, Standalone Nexus, and Azure Preview for Durable Workflows

Temporal's November 2026 platform update expands External Storage (Public Preview) to TypeScript, Java, .NET, Ruby, and Rust SDKs—offloading 256 KiB+ payloads past the 2 MB Event History cap—while introducing Standalone Nexus Operations, Temporal Cloud on Azure (Public Preview), Namespace encryption validation, and 11 GA AI integrations. Explore the architecture, pricing, and production trade-offs.

8 min read

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla