These write-ups are not threat intelligence and are not kept up to date as an incident develops. They are here to show how each attack worked, so you can find and fix the same techniques in your own setup. For the latest on an incident, read its sources.
tj-actions/changed-files supply-chain compromise (CVE-2025-30066)
March 2025 · Contained
Each compromised repository leaked the token for the next, from a spotbugs pull request to reviewdog to tj-actions, until the Action's moved release tags made every repository using it by tag print its own secrets into its workflow logs.
- Access held
- Read the rest
- tj-actions/changed-files supply chain attack (Wiz) ↗
Full summary
Four repositories, each leaking the token for the next. A pull_request_target workflow in spotbugs/sonar-findbugs leaked a maintainer's token in December 2024. Three months later the attacker used it to add a throwaway account to spotbugs/spotbugs, whose workflow dumped the repository's secrets, among them a reviewdog maintainer's token. With that they moved the v1 tag of reviewdog/action-setup, which tj-actions/changed-files ran in its own CI, and its log gave up the token of the tj-actions-bot account. That token merged a commit dressed as renovate[bot] and moved every tag of tj-actions/changed-files to it. Unit42 traced the intended target to coinbase/agentkit. Every other repository that used the Action by tag printed its secrets into its own workflow logs, which anyone can read on a public repository.
How it unfolded
Pick a step to zoom into it. A dashed line is a step the sources do not state. Blue dots are the checklist items that break the step.
Whole path
The whole attack, one row per step. Pick a step on the left, or click a box in its row.
In November 2024 a spotbugs maintainer stored their own PAT as a secret for a workflow in spotbugs/sonar-findbugs. On 6 December the attacker opened a pull request that changed the mvnw build script, and the workflow, triggered by pull_request_target, ran it with the secret in scope.
What breaks this step
- Audit every use of pull_request_target and remove or restructure risky ones
- Set the default GITHUB_TOKEN permission to read-only at the org level
- Require approval for first-time/external contributor workflow runs on forks
- Limit who and what can trigger workflows with workflow execution protections
- Disallow self-hosted runners on public repositories
- Pass untrusted values through env variables instead of ${{ }} expressions in run steps.
- Make self-hosted runners ephemeral.
- Lint workflows with zizmor or a similar tool in CI.
On 11 March 2025 the attacker used that PAT to invite a new account to spotbugs/spotbugs. Two minutes later the account pushed a branch with a workflow that encrypted the repository's secrets and uploaded them as an artifact, and deleted the branch within a second. Among the secrets was a reviewdog maintainer's PAT, which Unit42 believes also reached reviewdog/action-setup.
What breaks this step
- Restrict public repo creation, visibility changes, repo deletion, private forks and outside collaborator invites to owners
- Run a quarterly access review of owners, repo admins, team membership and outside collaborators
- Review every currently installed GitHub App / OAuth App and its granted scope
- Keep OAuth app access restrictions on and require security/IT approval for new apps
- CODEOWNERS in place, required on sensitive paths
- Rulesets applied: push restriction, tag protection, sensitive file-path protection
- Inventory every Actions secret and its visibility/scope; the results are usually surprising
- Cloud credentials migrated from static keys to OIDC federation, scoped to repo + branch
- Put production secrets in environments with required reviewers
- Set an organization-wide maximum PAT lifetime (90 days is a reasonable default)
- Disable classic PATs organization-wide, forcing migration to fine-grained PATs
- Secret scanning and push protection enabled
- Set `persist-credentials: false` on actions/checkout wherever later steps do not push
- Require organization owner approval for fine-grained PATs.
- Never upload the checkout workspace as an artifact.
With the reviewdog maintainer's PAT the attacker pointed the v1 tag at a malicious commit from a fork. Tag pushes are not in the audit log on the Free plan. The tag was restored the same evening.
What breaks this step
- Rulesets applied: push restriction, tag protection, sensitive file-path protection
- Make releases immutable, or protect release tags with a tag ruleset
- Third-party Actions pinned to a full commit SHA instead of a mutable tag or branch
- Set an organization-wide maximum PAT lifetime (90 days is a reasonable default)
- Disable classic PATs organization-wide, forcing migration to fine-grained PATs
- Secret scanning and push protection enabled
- Set `persist-credentials: false` on actions/checkout wherever later steps do not push
- Require organization owner approval for fine-grained PATs.
- Never upload the checkout workspace as an artifact.
A workflow in tj-actions/changed-files used tj-actions/eslint-changed-files, which runs reviewdog/action-setup. The malicious code dumped the runner's secrets, including a PAT of the tj-actions-bot account.
What breaks this step
- Third-party Actions pinned to a full commit SHA instead of a mutable tag or branch
- Restrict which Actions can run to GitHub-verified creators or an internal allow-list
- Set the default GITHUB_TOKEN permission to read-only at the org level
- Limit where workflow jobs can connect to, starting with release and deploy jobs
- Set `persist-credentials: false` on actions/checkout wherever later steps do not push
- Review new dependencies in PRs and hold new package versions for a few days before they're allowed in (a cooldown).
- Disable install scripts where you can (npm ignore-scripts).
With the bot's PAT the attacker added a commit made to look like renovate[bot]'s to a real Renovate pull request that merged automatically, then pushed tags that moved the existing versions to it. The commit was unverified, so the real Renovate account was not involved.
What breaks this step
- Rulesets applied: push restriction, tag protection, sensitive file-path protection
- Make releases immutable, or protect release tags with a tag ruleset
- Third-party Actions pinned to a full commit SHA instead of a mutable tag or branch
- Set an organization-wide maximum PAT lifetime (90 days is a reasonable default)
- Disable classic PATs organization-wide, forcing migration to fine-grained PATs
- Secret scanning and push protection enabled
- Set `persist-credentials: false` on actions/checkout wherever later steps do not push
- Require organization owner approval for fine-grained PATs.
- Never upload the checkout workspace as an artifact.
coinbase/agentkit ran tj-actions/changed-files@v39 in a workflow with write-all permissions. At 15:10 UTC on 14 March the attacker obtained a GITHUB_TOKEN with write access to it. Coinbase removed the workflow at 16:37 and says the attacker could not use its secrets or publish packages.
What breaks this step
- Third-party Actions pinned to a full commit SHA instead of a mutable tag or branch
- Restrict which Actions can run to GitHub-verified creators or an internal allow-list
- Set the default GITHUB_TOKEN permission to read-only at the org level
- Limit where workflow jobs can connect to, starting with release and deploy jobs
- Set `persist-credentials: false` on actions/checkout wherever later steps do not push
- Review new dependencies in PRs and hold new package versions for a few days before they're allowed in (a cooldown).
- Disable install scripts where you can (npm ignore-scripts).
At 16:57 UTC every tag pointed at the malicious commit. The payload dumped runner memory into the workflow log as double base64: AWS keys, PATs, npm tokens and private keys, readable by anyone on public repositories. Wiz saw no exfiltration to an outside server. The repository was taken down on 15 March and restored without the commits.
What breaks this step
- Third-party Actions pinned to a full commit SHA instead of a mutable tag or branch
- Restrict which Actions can run to GitHub-verified creators or an internal allow-list
- Set the default GITHUB_TOKEN permission to read-only at the org level
- Limit where workflow jobs can connect to, starting with release and deploy jobs
- Set `persist-credentials: false` on actions/checkout wherever later steps do not push
- Review new dependencies in PRs and hold new package versions for a few days before they're allowed in (a cooldown).
- Disable install scripts where you can (npm ignore-scripts).
- Treat workflow logs as a place secrets leak: on a public repository anyone can read what the payload printed.
Frameworks
Part of
Contained. First seen March 2025. Mapping by ghtier, not yet reviewed. Threat landscape
Sources
- researchGitHub Actions supply chain attack: Coinbase to tj-actions
- advisoryCISA alert: tj-actions/changed-files and reviewdog/action-setup
- advisoryGHSA-mrrh-fwg8-r2c3 (CVE-2025-30066)
- trackertj-actions/changed-files supply chain attack (Wiz)
Reported by: Unit42