Poisoned Pipeline / Techniques / T0228
Read secrets from the CI runner worker's process memory
A CI job's secrets are not only in its own environment. On GitHub
Actions the runner resolves secrets and hands them to the job through
the Runner.Worker process, so anyone who can read that process's memory
as root can recover values the step was never given — including tokens
the workflow did not reference and secrets masked from the log. The
attacker does not need a runner exploit for the read: GitHub-hosted
runners grant the runner user passwordless sudo, so code running in any
step can escalate to root, locate the worker by scanning /proc/*/cmdline
for Runner.Worker, and read /proc/<pid>/maps and /proc/<pid>/mem
directly. No file, no environment variable and no log line is involved,
which is why log masking and environment hygiene do not touch it.
tj-actions/changed-files was reported to use this in March 2025; Socket
describes the same routine in the Miasma-family worm it analysed in
November 2026, where an embedded Python script piped to sudo python3
reads the worker's maps and memory and pulls secrets out. That build
also re-establishes the conditions for the read: it kills the
Harden-Runner container through the Docker socket, writesrunner ALL=(ALL) NOPASSWD:ALL into /etc/sudoers.d from a privileged
Alpine container, and rewrites /etc/hosts and /etc/resolv.conf, so the
privilege the read depends on survives a runner image that had removed
it.
Distinct from T0140, which harvests tokens from environment variables,
including other processes' /proc/<pid>/environ; from T0183, which is
short-lived cloud credentials and instance roles; and from T0184, which
reads credential files. Here the secret never leaves the runner process
except through its memory, and the technique's precondition is the
privilege the hosted runner grants by default.
Where this idea came from
From Socket's 6 November 2026 analysis of the strutil-core gem, where an embedded Python script piped to sudo python3 finds Runner.Worker in /proc/*/cmdline and reads /proc/<pid>/maps and /proc/<pid>/mem on a GitHub-hosted runner. Socket ties the routine to the March 2025 tj-actions/changed-files compromise. The secrets never appear in the step environment, a file or a log line, and the read works because hosted runners grant passwordless sudo.
Mitigations
None linked yet.
Detections
None linked yet.
Observed in incidents (2)
- A gem sold as string helpers runs a 5.48 MB Miasma-family worm at install, poisons AI coding tools, and wipes the home directory once the stolen token stops working
- Stolen GitHub tokens opened probe pull requests in 61,764 repositories, injected workflows that harvested CI secrets and cloud credentials, and rewrote cloud trust policies so the access survived the revert