Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action tj-actions/changed-files is compromised #3373

Open
hugovk opened this issue Mar 15, 2025 · 3 comments
Open

GitHub Action tj-actions/changed-files is compromised #3373

hugovk opened this issue Mar 15, 2025 · 3 comments

Comments

@hugovk
Copy link
Member

hugovk commented Mar 15, 2025

See https://semgrep.dev/blog/2025/popular-github-action-tj-actionschanged-files-is-compromised/

https://github.com/search?q=org%3Apython+tj-actions&type=code

https://github.com/Ana06/get-changed-files could be used as a replacement, or you could rewrite the logic in a Python script.

@hugovk
Copy link
Member Author

hugovk commented Mar 15, 2025

@marcorichetta
Copy link
Contributor

marcorichetta commented Apr 2, 2025

A quick fix is to pin to an older hash:

* ~[ci: use pinned tj-actions/changed-files v39 matter-labs/era-compiler-llvm#792](https://github.com/matter-labs/era-compiler-llvm/pull/792)~

* ~[Use unexploited 'tj-actions/change-files' action hasura/ndc-hub#508](https://github.com/hasura/ndc-hub/pull/508)~

Edit: The tj-actions/changed-files repo has now been deleted.

Hi @hugovk, is this still relevant?

  • The repo is not deleted.
  • New versions were released

Per https://github.com/tj-actions/changed-files/releases/tag/v46, we should revoke the tokens and maybe use new tagged versions.

cc @cmaureir #3374

@hugovk
Copy link
Member Author

hugovk commented Apr 2, 2025

It must have been temporarily made private, and made public again after they removed the malicious commits.

The advice at https://semgrep.dev/blog/2025/popular-github-action-tj-actionschanged-files-is-compromised/#header-3 is:

  1. Investigate if you have any repositories that did use tj-actions, you likely need to rotate any secrets that were made public in the CI build logs, using the steps above in this blog post
    1. Any tj-actions that leveraged tags would need to be investigated e.g., tj-actions/changed-files@v45 should be reviewed
    2. Any tj-actions versions that used the compromised commit tj-actions/changed-files@0e58ed8 should be reviewed
  2. Upgrade all workflow actions to use the latest release immutable commit: tj-actions/changed-files@2f7c5bf or use the latest @v46 tag.

cmaureir pushed a commit that referenced this issue Apr 4, 2025
Per discussion in issue
#3373, this PR update
`tj-actions/changed-files` to its latest version
[v46](https://github.com/tj-actions/changed-files/releases/tag/v46.0.3).

Related PR: #3374

Supersedes #3377
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants