Audit Your GitHub Actions PR Triggers Before Changing Event Policies
Trace a PR workflow's code, inputs, permissions, and side effects before deciding whether it needs pull_request_target.

A workflow that adds a label and a workflow that runs a contributor’s build can both start when a pull request opens. They should not inherit the same trust just because they share that moment.
Before allowing pull_request_target, write down four things: which workflow definition runs, which code it executes, what input comes from the contributor, and what the job can change. That small inventory is more useful than searching for the trigger and replacing it everywhere.
The event is an authority choice
GitHub’s security guide distinguishes the base-repository context of pull_request_target from the constrained context of a fork’s pull_request run. The distinction matters when automation needs repository secrets or write permissions.
A metadata task might need authority to label an issue. A test job needs to execute the proposed code. Combining those responsibilities can give code you have not reviewed access to authority it should not have.
GitHub’s November 2 announcement schedules default blocking for affected public repositories on December 2, 2026, with temporary enforcement windows on November 9 and 16, 16:00–18:00 UTC. Applicable event policies can change the outcome; private and internal repositories are outside this announcement’s scope. Check the current notice before planning a migration.
The deadline gives you a reason to inspect. It does not tell you which of your jobs should be privileged.
Read one small workflow before the whole repository
Consider this synthetic example. It prints metadata and has no checkout step:
name: Inspect PR metadata
on:
pull_request_target:
types: [opened, edited]
permissions:
contents: read
jobs:
inspect:
runs-on: ubuntu-latest
steps:
- name: Print a title as data
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: printf '%s\n' "$PR_TITLE"
The title is still untrusted. Passing it through an environment variable and quoting it keeps it as an argument to printf, rather than inserting it directly into the shell program. That does not make every possible use of the value safe; this particular command only prints it.
This fixture was inspected locally, not run as a hosted GitHub job. It illustrates an audit boundary, not an event-policy exemption or an operational labeling solution.
| Question | Answer for this fixture | Change that requires another review |
|---|---|---|
| What input comes from the PR? | Its title | Using the title as a command, path, or API parameter |
| Does it execute the proposed code? | No checkout or build step | Fetching and running a PR revision |
| What permissions are declared? | contents: read |
Adding write scopes or secrets |
| What side effect occurs? | A log line | Posting, publishing, deploying, or changing a label |
Recorded static review of the example above. This is an evidence view, not a GitHub Actions run.
Find the path from untrusted input to an action
From the repository root, use this as a starting inventory:
rg -n 'pull_request_target|workflow_run|checkout|permissions:|uses:|run:' .github/workflows
The search was checked against the fixture. It locates review points; it is not a YAML analyzer or a security verdict. Follow reusable workflows and actions rather than assuming that the visible file contains every operation.
For each privileged path, ask where code enters. Checkout is one route; scripts can fetch code themselves, and artifacts can become executable input. Then ask whether that work genuinely needs privileged authority. Separate low-trust testing from metadata automation where their jobs differ.
If workflow execution itself is unfamiliar, LabEx’s checkout activity provides prerequisite practice. It is not a test of the new event policy.
Leave evidence for the next maintainer
Keep a short record for each reviewed job: event, workflow source, executable-code source, untrusted inputs, permissions, side effects, and the reason any privilege remains. Link the actual file and revision you reviewed.
Then inspect the relevant policy insights and test the intended behavior in a disposable repository you control. A successful static review cannot show whether a hosted policy permits a run. A permitted run cannot show that its handling of untrusted code is safe.
References
- Securely using pull_request_target: trust boundaries and platform protections.
- Default-policy enforcement announcement: current dates and affected repository scope, checked November 5, 2026.

