theregister.com

GitHub supply chain attack spills secrets from 23,000 projects

It's not such a happy Monday for defenders wiping the sleep from their eyes only to deal with the latest supply chain attack.

StepSecurity disclosed a compromise of the popular GitHub Action tj-actions/changed-files, which works to detect file changes in open source projects, noting that more than 23,000 GitHub repositories currently use the automation project's code.

The security shop said attackers compromised the project at some unknown point before March 14 (March 12, according to Sysdig) and altered its code so the Action would leak secrets from a project's developer workflow into build logs.

In cases where these logs are publicly available, such as public repositories, it means that any project using tj-actions/changed-files would be leaking secrets for all to see. The risk to private repos is thought to be much lower, but maintainers should still consider their projects compromised.

The GitHub Action was tampered with to inject a Node.js function containing base64-encoded instructions to run a Python script that leaked a project's continuous integration / continuous delivery (CI/CD) secrets from the Runner Worker process, according to Sysdig.

Such secrets can include API keys, passwords, access tokens, and more, so it will come as some relief to admins that there is no evidence that any of the secrets leaked from public repos were exfiltrated to any outside server.

Similar malicious code could be found in another project – Flank – Sysdig noted, and in this case, the data was sent to a GitHub Gist via a POST request.

The motivation for the attack, like the identity of those behind it, is unknown but the tj-actions team confirmed that the compromise unfolded after a bot account was breached.

"This attack appears to have been conducted from a PAT [personal access token] linked to @tj-actions-bot account to which 'GitHub is not able to determine how this PAT was compromised,'" said software engineer Tonye Jack, author of tj-actions.

Jack later confirmed that the password for the bot account was updated, passkeys are now used to secure the account, its permissions were downgraded to the minimum necessary, and commits must now be signed to ensure the integrity of contributions.

"The personal access token affected was stored as a GitHub action secret which has since been revoked," he added. "Going forward no PAT would be used for all projects in the tj-actions organization to prevent any risk of reoccurrence.

"We'll continue to monitor and enhance security measures as needed to prevent any future incidents. If you have any additional recommendations, feel free to share them."

Cybersecurity experts covering the attack have all advised that an immediate response is required from project maintainers to ensure their secrets aren't exposed. The researchers over at Wiz said they've identified "dozens" of public repos with exposed secrets freely available for anyone to see, including those owned by large organizations.

"Some of the leaked secrets we've identified so far include valid AWS access keys, GitHub Personal Access Tokens (PATs), npm tokens, private RSA Keys, and more," said the Wiz team.

Project maintainers who think they might be affected are advised to audit their repos and rotate all secrets in any that use tj-actions/changed-files. These secrets should be considered compromised, and now that the attack is publicized, criminals will be scouring GitHub for useful data.

Both Wiz and Sysdig recommended that developers find alternatives for tj-actions/changed-files and remove all references to the GitHub Action across all repo branches.

GitHub generally suggests projects that use Actions should pin them to specific commit hashes instead of version tags if they want to avoid similar supply chain attacks in the future.

"Pinning an action to a full-length commit SHA is currently the only way to use an action as an immutable release," its guidance says. "Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. When selecting a SHA, you should verify it is from the action's repository and not a repository fork."

The compromise at tj-actions/changed-files has now been assigned a vulnerability: CVE-2025-30066 (8.6 – high).

The Register contacted Tonye Jack for additional information. ®

Read full news in source page