• Blog
  • Github Actions tj-actions/changed-files Attack

Blog

Github Actions tj-actions/changed-files Attack

Get details on this recent supply chain attack and how to prevent similar attacks in the future.

Attention GitHub Action users! The popular ‘tj-actions/changed-files’ GitHub Action was compromised between March 12th and March 15th, 2025. During this time, the compromised Action printed repositories' secrets values to build logs, and any pipelines and workflows using this Action were subject to credential leaks. All tagged versions of the Action were compromised during this time, and we advise all users of the Action to take steps to secure their secrets values. As of the time of publishing, the issue has been resolved. 

 

How did the attack play out? 

While it is still unclear how the attacker gained access to the project, maintainers say there is reason to suspect that a personal access token (PAT) belonging to a privileged bot active in the repo was compromised. The attacker then used the token to impersonate the bot and retag all versions of the Action to point to a malicious commit containing a Base64 encoded version of the following script: 

Screenshot 2025-03-18 at 9.47.39 AM

This code accesses and runs the 'memdump.py' script, finds secrets values within the results, and prints them to the workflow logs, encoding them twice in Base64 to avoid automated detection.  

 

Who is at risk?  

Any repo with workflows using the ‘tj-actions/changed-files' Action is at risk of a secrets leak. Maintainers of these repos should immediately check the build logs of runs in the above-stated time frame and consider any printed credential compromised. While this is naturally a greater risk for open-source projects, as anyone could have gained access to leaked credentials, maintainers of private projects should still be wary. Any actor with read access to build logs, such as external collaborators or contractors, may have been able to compromise these credentials, even if they do not regularly have access to secrets values. We strongly recommend rotating secrets used in affected repositories. 

 

How to avoid a similar attack going forward 

To mitigate the risk of being affected by this type of attack in the future, always reference specific commit SHAs when using GitHub Actions, as opposed to tags and mutable references (such as—: latest or:v1.0.5).  

For more details and recommendations on GitHub Actions security, including a link to our State of GitHub Actions Security report, see our recent blog post 

For details on how Legit can help you protect your GitHub pipelines at scale and create notifications about the use of insecure custom GitHub Actions, contact us to schedule a demo.  

 

 

Share this guide

Published on
March 18, 2025

Get a stronger AppSec foundation you can trust and prove it’s doing the job right.

Request a Demo