Audit Actions logo

Audit Actions

Community
saschb2b
audit-actions

Audit a repository's GitHub Actions workflows for unsafe pull_request_target usage that can lead to supply chain compromise. Use when the user asks to audit workflows, review CI/CD security, check pwn request risk, harden Actions, or after a supply chain incident in a dependency. Also use proactively when reviewing any PR that touches .github/workflows/.

Overview

Publishersaschb2b
Repositoryskills
Skill nameaudit-actions
Stars
22
Forks
3
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by saschb2b on GitHub. Read the source before you install it.

Installation

Install the Audit Actions AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/saschb2b/skills/tree/main/skills/engineering/audit-actions
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/saschb2b/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/engineering/audit-actions .claude/skills/audit-actions
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Audit Actions in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Audit Actions on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Audit Actions is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Audit pull_request_target

What this skill catches

The pull_request_target + PR-head checkout combination is the entire bug class behind the public compromises of TanStack (May 2026), Nx (Aug 2025), PostHog (Nov 2025), Trivy (Feb 2026), tj-actions/changed-files (Mar 2025), and the prt-scan campaign (Mar 2026). Permission flags do not prevent it. SLSA provenance does not prevent it. Cache writes bypass permissions: contents: read entirely.

If a workflow uses pull_request_target AND checks out the PR head, attacker-controlled code runs on a runner that holds the base repo's GITHUB_TOKEN, has access to declared secrets, and can mint OIDC tokens for trusted publishing.

Run

  1. Find every usage. Locally: grep -rn "pull_request_target" .github/workflows/. Org-wide: gh search code "pull_request_target" --owner $ORG --extension yml.
  2. For each match, ask in order. Stop at the first "yes" — that's a finding.
    • Does the workflow check out the PR head (actions/checkout with ref: ${{ github.event.pull_request.head.sha }} or similar)? CRITICAL.
    • Does it run any contributor-supplied code (pnpm install, npm test, make build, actions/setup-*, a script committed in the PR)? CRITICAL.
    • Does it write to the Actions cache (no lookup-only: true on actions/cache)? HIGH. Cache writes use a runner-internal token and bypass workflow permissions; a poisoned cache is restored by release.yml later.
    • Does it use third-party actions pinned by tag (@v1, @main) rather than commit SHA? HIGH.
    • Does it set id-token: write? HIGH in combination with any of the above — OIDC tokens are scraped from runner memory, not stolen from secrets.
    • Is the trigger even necessary? Most legitimate uses (labelling, commenting, metadata) work fine with pull_request.

Findings template

For each workflow, produce:

file: .github/workflows/<name>.yml
trigger: pull_request_target
findings:
  - <CRITICAL|HIGH|MEDIUM>: <what>
recommendation: <one of below>

Fixes, in order of preference

  1. Switch to pull_request. Default answer. If the workflow doesn't need write access to the base repo or secrets, this closes the entire bug class.
  2. Two-workflow pattern (pull_request + workflow_run). Untrusted code runs in a pull_request workflow with no secrets and no write permissions, writes its output as an artifact, and a workflow_run workflow triggered on completion reads the artifact and does the privileged work. The trust boundary becomes the artifact handoff — auditable in YAML.
  3. Remove the PR-head checkout. If the workflow legitimately needs pull_request_target (labelling, metadata), do not check out or execute the PR's code at all.
  4. Disable cache writes from untrusted contexts. Use actions/cache/restore@v4 only; do not run the save step on fork-triggered builds. Or scope cache keys with attacker-derived prefixes so they cannot collide with release-pipeline keys.
  5. Pin every third-party action by full commit SHA, not tag. tj-actions/changed-files' compromise propagated to thousands of repos because they used @v44.
  6. Minimize the publish workflow's surface. If id-token: write must exist, the workflow with it should do nothing except verify pre-built artifacts and publish — no third-party actions, no postinstall scripts, no untrusted paths.

What this skill does NOT cover

  • npm-side hardening (2FA / FIDO2, fine-grained tokens, minimumReleaseAge). Out of scope.
  • Self-hosted runner abuse — different threat model.
  • Script injection via ${{ github.event.pull_request.title }} and friends. Related but separate; flag for follow-up.

Source

Based on The pull_request_target Trap — full attack anatomy of the May 2026 TanStack incident and the year of prior cases.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Audit Actions AI skill do?

Audit a repository's GitHub Actions workflows for unsafe pull_request_target usage that can lead to supply chain compromise. Use when the user asks to audit workflows, review CI/CD security, check pwn request risk, harden Actions, or after a supply chain incident in a dependency. Also use proactively when reviewing any PR that touches .github/workflows/.

Why use Audit Actions on TypingMind?

Because you install it once and use it with any model. Audit Actions is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Audit Actions in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/saschb2b/skills/tree/main/skills/engineering/audit-actions. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Audit Actions?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Audit Actions?

As many as you like. As long as a model supports skills, you can use Audit Actions with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Audit Actions AI skill free?

Yes. It is published on GitHub by saschb2b under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇