Sanniv Khare 8 min read

pull_request_target blocked on 2 Dec: 31 mobile repos checked

pull_request_target blocked on 2 Dec: 31 mobile repos checked

Takeaway: from 2 December 2026, GitHub Actions blocks pull_request_target events by default in every public repository on GitHub Free, Team and Enterprise Cloud, unless an Actions event policy explicitly allows them (GitHub changelog, 2 Nov 2026). A blocked workflow does not run; it shows up as a failed run with an error annotation. If you maintain a public library or sample app, list your pull_request_target workflows this week and decide, for each one, between an explicit allow and a rewrite.

We ran a small scan over 31 public mobile repositories (React Native core and libraries, Expo, Android samples, Swift packages) on 25 Nov 2026. Nine of them use the trigger, in 23 workflows. Below: the numbers, what those workflows do, the script, and a rewrite of the most common pattern that passes actionlint 1.7.12.

Why we did this: our React Native banking and TV apps depend on most of these libraries, and when a library’s CI stops labelling or checking pull requests, fixes reach us more slowly. The same check applies to any public repository of our own.

What changes on 2 December

From the changelog and Socket’s write-up (5 Nov, updated 18 Nov):

Point What the sources say
Date Enforcement starts 2 Dec 2026 (it was first planned for 2 Nov). Brownouts ran on 9 and 16 Nov, 16:00 to 18:00 UTC
Scope Public repositories only. Private and internal repositories are not affected. GitHub Enterprise Server is not affected
Effect Blocked attempts create failed runs with an error annotation; the workflow does not execute
Until then The default rule runs in evaluate mode: workflows run, with warnings, and Insights shows which runs would be blocked
Opt out Allow pull_request_target in an Actions event policy at repository, organization or enterprise level; workflow file targeting allows specific files only (docs)
Existing policies Not replaced by the new default
Plans Actions policies became free on all plans (Socket, update of 17 Nov)

Neither source says that pull requests from branches in the same repository are exempt, and neither says that GITHUB_TOKEN or secrets behave differently. The reason for the change is the known one: pull_request_target runs in the context of the base repository and can read its secrets, so a workflow that runs code from the pull request hands that code the secrets.

What we found in 31 mobile repos

We cloned the .github folder of each repository’s default branch and listed every workflow file that triggers on pull_request_target.

Terminal card: 31 repos scanned, 9 with pull_request_target, 23 workflows

Tallied from the scan script’s output, default branches as of 25 Nov 2026.

Repository Workflows on pull_request_target What they do
expo/expo 8 code mentions, contributor labels, issue triage, evidence and triage checks, automated review, SDK cherry-picks
software-mansion/react-native-reanimated 5 PR description and label format, Slack notice, cache cleanup on close, a label-triggered verification job
facebook/react-native 3 PR body analysis, JS API change report, visual test approval
callstack/react-native-paper 2 contributor label, PR checks
Shopify/flash-list 1 CLA check
swiftlang/swift-package-manager 1 PR dependency check (a reusable workflow, read-only permissions)
invertase/react-native-firebase 1 semantic PR title
react-native-community/cli 1 release drafter
react-navigation/react-navigation 1 PR description and screenshot check

The 22 repositories with none: react-native-screens, react-native-safe-area-context, react-native-gesture-handler, react-native-vision-camera, react-native-maps, react-native-permissions, react-native-vector-icons, async-storage, react-native-bottom-sheet, Hermes, Yoga, Flutter, Kotlin, swift-nio, swift-testing, and Google’s nowinandroid, compose-samples, architecture-samples, sunflower, snippets, xr-samples and accompanist. Android and Apple sample repositories do not use the trigger at all; the libraries with bots and contributor checks do.

Sorting the 23 workflows by what they touch:

  • 11 only read pull request metadata (title, body, author, labels) and write labels or comments. No checkout of pull request code.
  • 11 check out the base branch and run the repository’s own scripts or actions. Several (Expo’s especially) say so in a comment at the top of the file, and React Native’s API report reads one file from the pull request head with git show as data, without running it.
  • 1 fetches the pull request head: Reanimated’s label-triggered verification job. It only runs when a maintainer adds a specific label, fetches the head into a separate folder with git hooks and symlinks turned off, and restores a trusted checkout afterwards.

We can see the workflow files, not the repositories’ settings. Any of these projects may already have an event policy that allows the trigger, in which case nothing changes for them on 2 December.

The scan script

Run it with any list of owner/repo names. It needs only git and grep, and it never downloads anything outside .github.

#!/usr/bin/env bash
# List workflows that trigger on pull_request_target in each repo.
# Usage: ./prt-scan.sh owner/repo [owner/repo ...]
set -u
for repo in "$@"; do
  dir=$(mktemp -d)
  git clone -q --depth 1 --filter=blob:none --sparse \
    "https://github.com/$repo.git" "$dir" || continue
  git -C "$dir" sparse-checkout set .github >/dev/null
  for wf in "$dir"/.github/workflows/*.y*ml; do
    [ -e "$wf" ] || continue
    grep -qE '^\s*-?\s*pull_request_target\s*:?\s*$|pull_request_target\s*:|\[.*pull_request_target' "$wf" || continue
    head_refs=$(grep -cE 'pull_request\.head\.(sha|ref)|refs/pull/' "$wf")
    printf '%-38s %-42s head-refs=%s\n' "$repo" "$(basename "$wf")" "$head_refs"
  done
  rm -rf "$dir"
done

head-refs counts lines that mention the pull request head SHA, head ref or refs/pull/. It is a pointer for reading, not a verdict: Reanimated’s cache cleanup scores 2 because it deletes caches keyed on refs/pull/..., which is harmless.

Allow it, or rewrite it

For each workflow there are two honest options.

Allow it explicitly. If the workflow only reads metadata and posts labels or comments, or checks out the base branch and never runs pull request code, an event policy that allows pull_request_target for that one workflow file is the smallest change. Use file targeting rather than a repository-wide allow, so a future workflow does not inherit it.

Rewrite it. If the workflow builds, tests or lints pull request code, or you would rather not keep an exception, split it in two: a pull_request workflow that does the work with read-only permissions and no secrets, and a workflow_run workflow that reads its result and does the privileged part (the comment, the label).

Before and after: one pull_request_target workflow split into pull_request and workflow_run

The common “check the PR description and comment” job, before and after.

The two files in full:

# .github/workflows/pr-check.yml
name: PR check
on:
  pull_request:
    types: [opened, edited, reopened, synchronize]
permissions:
  contents: read
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - name: Check the description
        env:
          BODY: ${{ github.event.pull_request.body }}
          NUMBER: ${{ github.event.pull_request.number }}
        run: |
          mkdir -p out
          echo "$NUMBER" > out/number
          if [ "${#BODY}" -gt 1000 ]; then
            echo "too-long" > out/result
          else
            echo "ok" > out/result
          fi
      - uses: actions/upload-artifact@v4
        with:
          name: pr-check
          path: out/
# .github/workflows/pr-check-comment.yml
name: PR check comment
on:
  workflow_run:
    workflows: ["PR check"]
    types: [completed]
permissions:
  pull-requests: write
  actions: read
jobs:
  comment:
    runs-on: ubuntu-latest
    if: github.event.workflow_run.event == 'pull_request'
    steps:
      - uses: actions/download-artifact@v4
        with:
          name: pr-check
          run-id: ${{ github.event.workflow_run.id }}
          github-token: ${{ secrets.GITHUB_TOKEN }}
      - name: Comment when the check failed
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          REPO: ${{ github.repository }}
        run: |
          number=$(tr -cd '0-9' < number)
          result=$(tr -cd 'a-z-' < result)
          if [ "$result" = "too-long" ]; then
            gh pr comment "$number" --repo "$REPO" \
              --body "Please keep the description under 1000 characters."
          fi

Three details matter. The artifact comes from an untrusted run, so the second workflow strips it down to digits and a fixed word before using it, and never executes anything from it. Pull request text reaches the shell only through environment variables, never through ${{ }} inside run:. And the privileged workflow never checks out the pull request.

actionlint output: the two new files pass; an inline PR title in run is flagged

actionlint 1.7.12 on our two files, and on a deliberately bad one-liner for comparison.

We checked both files with actionlint 1.7.12: no findings. For comparison we also linted a one-line pull_request_target workflow that puts github.event.pull_request.title straight into run:; actionlint flags it as untrusted input. That rule is worth keeping in CI whichever option you pick. Runtime behaviour of the pair on a live repository is outside this post; try it on a fork before you move a busy repository over.

A checklist for this week

  1. Run the scan on your own public repositories, or search them for pull_request_target.
  2. Open each match and note: does it check out or run pull request code, and which secrets can it read?
  3. Metadata-only and base-checkout workflows: allow them by file in an event policy, or rewrite them if you prefer no exceptions.
  4. Anything that runs pull request code: rewrite with pull_request plus workflow_run.
  5. Look at the Actions policy Insights before 2 December to see which runs the default rule would block.
  6. After 2 December, watch for failed runs with the blocking annotation on new pull requests from contributors.

We will update this post if GitHub publishes more detail on or after 2 December.

Made by the team behind this post

Apps from our studio

  • Nix

    The Mac uninstaller that finds what the Trash leaves behind: caches, logs, derived data and saved states.

    macOS

    Get
  • Cardigami

    Pop-up greeting cards that rise out of the fold on iPhone Duo.

    iPhone · App Store

    Get
  • BMDB.fun

    Your Bollywood world at a glance, with links straight to the OTT app that streams each film.

    Android TV · Web · Mobile

    Get
  • OneClick QuitAll

    Quit every running app in one click. See memory and CPU first.

    macOS · Mac App Store

    Get

Need this built? Let’s talk.

We build and run apps for Mac, TV, mobile and the web, and write about what we learn.