# tj-actions changed-files Compromise > March 2025 chained GitHub Actions compromise (CVE-2025-30066, with reviewdog CVE-2025-30154): every version tag of `tj-actions/changed-files`, used by ~23,000 repos, was repointed to a commit that dumped runner memory secrets into workflow logs. It started as a targeted attack on Coinbase. ## How it works Attack chain, reconstructed by Unit 42 (each hop steals a PAT that unlocks the next): | Date (UTC) | Step | |---|---| | 2024-11-28 | A SpotBugs maintainer puts their own PAT into a `spotbugs/sonar-findbugs` workflow to fix a CI problem | | 2024-12-06 | Attacker (deleted user `randolzfow`) opens a fork PR against a **`pull_request_target`** workflow in `sonar-findbugs` and leaks the maintainer PAT. This is a classic [[Pwn Requests\|pwn request]] | | 2025-03-11 10:50 | With that PAT, the attacker invites throwaway user `jurkaofavak` to `spotbugs/spotbugs`, pushes a branch containing a malicious workflow, and dumps all repo secrets. Those include a reviewdog maintainer's PAT stored there | | 2025-03-11 18:42–20:31 | `reviewdog/action-setup@v1` tag points to a malicious commit (CVE-2025-30154), then gets reverted. The commits came from fork `iLrmKCu86tjwp8` | | 2025-03-12/13 | Throwaway users fork `coinbase/agentkit` and experiment with its `changelog.yml`, which used `tj-actions/changed-files@v39`. A March 13 payload variant explicitly targets Coinbase | | ~2025-03-14 | `tj-actions/eslint-changed-files` runs `reviewdog/action-setup` as a composite action. This leaks the `tj-actions-bot` PAT, and the attacker uses it to commit `0e58ed8` (spoofing `renovate[bot]` inside a real auto-merged Renovate PR) and then **force-repoint every tag, v1.0.0 through v44.5.1**, to it | | 2025-03-14 | StepSecurity Harden-Runner flags anomalous egress (gist fetch). Fixed in v46.0.1, and both CVEs were added to CISA KEV on 2025-03-26 | ### Stealth primitives the attacker relied on - **Fork-network shadow commits**: a commit pushed to a fork is addressable as `owner/repo@<sha>` in the parent. After the fork or user is deleted, it can't be traced unless you know the SHA. - **Tag pushes are not recorded in the GitHub org audit log**, according to Unit 42. Repointing tags is near-invisible. - **Orphaned commits** are reachable by SHA after their branch is deleted, so tags can point at code that isn't on any branch. - **Commit impersonation**: the commits were unsigned, and their author fields were set to `renovate[bot]` or `github-actions[bot]`. ## Payload - The `index.js` in the action got a Node function holding a base64 blob. When decoded, it `curl`s a Python script from a GitHub gist and runs it with `sudo`. - The script finds the `Runner.Worker` process, walks `/proc/<pid>/maps` and `/proc/<pid>/mem`, regex-matches `{"value":"...","isSecret":true}`, and prints the matches **double-base64-encoded** to the job log. No external exfiltration was seen for tj-actions. On public repos, the logs are public, so leaking the secrets there was enough. - The reviewdog variant embedded the payload directly in base64 and didn't fetch it with `curl`. A Flank variant POSTed the stolen data to a gist instead. - Typical loot: AWS keys, GitHub PATs, npm tokens, private RSA keys. `ghs_` installation tokens expire at job end or within 24h, so the real risk was explicitly referenced `secrets.*`. ## Detection / response ```bash # org-wide usage https://github.com/search?q=org:<ORG>+uses:+tj-actions/&type=code semgrep --config r/10Uz5qo/semgrep.tj-actions-compromised ``` - In runs between 2025-03-12 00:00 and 2025-03-15 12:00 UTC, expand the "Get changed files" step. For reviewdog, look for `🐶 Preparing environment ...`. A double-base64 string there means the payload ran. Hunters released a tool that double-decodes log blobs and greps for `isSecret`. - Runtime signals: a `/proc` memory-dump rule (Sysdig). The Falco rule fires when `base64` reads stdin piped from `curl`/`wget`. - Remove references on **all branches**, rotate any secret that was explicitly referenced, and download the logs before you delete runs. ## Lessons / defenses - **Pin to full commit SHA.** Hash-pinned consumers were unaffected unless they bumped to a malicious SHA during the window. See [[GitHub Actions Security]]. - Use an org-level allowed-actions policy, put secrets behind Environments with required reviewers, require MFA for anyone who can push tags, and monitor egress (Harden-Runner). - Don't store long-lived PATs as repo secrets in repos that run `pull_request_target`. The entire chain started from one maintainer PAT. - Transitive actions (composite `uses:` inside an action you pinned) are not covered by your pin. ## Related - [[Software Supply Chain Security]] - [[GitHub Actions Security]] - [[Pwn Requests]] - [[CI-CD Pipeline Attacks|CI/CD Pipeline Attacks]] - [[Shai-Hulud Worm]] - [[Leaked Cloud Credentials]] ## Sources - [[raw/unit42.paloaltonetworks.com/github-actions-supply-chain-attack-coinbase-to-tj-actions-4038|Unit 42 — GitHub Actions Supply Chain Attack: Coinbase to tj-actions]] - [[raw/cisa.gov/tj-actions-changed-files-compromise-cve-2025-30066-4040|CISA — tj-actions/changed-files compromise (CVE-2025-30066)]] - [[raw/wiz.io/github-action-tj-actions-changed-files-supply-chain-attack-everything-4039|Wiz — tj-actions/changed-files supply chain attack]] - [[raw/wiz.io/new-github-action-supply-chain-attack-reviewdog-action-setup-9437|Wiz — reviewdog/action-setup]] - [[raw/snyk.io/reconstructing-the-tj-actions-changed-files-github-actions-compromise-9226|Snyk — Reconstructing the tj-actions compromise]] - [[raw/sysdig.com/tj-actions-supply-chain-attack-cve-2025-30066-sysdig-4340|Sysdig — tj-actions Supply Chain Attack]] - [[raw/semgrep.dev/tj-actions-changed-files-compromised-semgrep-4341|Semgrep — tj-actions/changed-files Compromised]] - [[raw/openssf.org/securing-ci-cd-after-tj-actions-and-reviewdog-attacks-4037|OpenSSF — Securing CI/CD After tj-actions and reviewdog]] - [[raw/hunters.security/github-actions-supply-chain-attacks-tj-actions-and-reviewdog-hunters-4343|Hunters — tj-actions and reviewdog]]