-
Notifications
You must be signed in to change notification settings - Fork 38
Add tj-actions/changed-files
#312
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
base: main
Are you sure you want to change the base?
Conversation
|
This is the one that had the big supply chain incident, right? https://www.cve.org/CVERecord?id=CVE-2025-30066 |
|
Yes! I pinned a patched version though. I was also wondering if this should be a reason not to use it - but to me, it feels like a good sign of community engagement and repo maintenance |
|
Indeed using pinned versions is part of what protects us against such attacks. From https://semgrep.dev/blog/2025/popular-github-action-tj-actionschanged-files-is-compromised/ I understand this was not the first time this repo was compromised. Perhaps you could say that now that they've experienced this compromise they'll be extra careful not to let it happen again in the future - tj-actions/changed-files#2464 possibly suggests so. |
|
If you just need the list of changed files, a simple There is also a GH API call, but I'd not use that in a GH workflow, because It yields the list of changed files of the current state of the PR, not at the state of the PR against which a workflow run started (potential race when the PR has changed in the meantime or re-running an older workflow run). |
|
I can do that in bash - true! But I don't think it's that simple: for example besides the PR changes you mentioned, I also need to check changed files for pushes, and then handle the exclusions. The code ends up being more complicated than running the tests themselves 😅 Not sure if it's very committer-friendly or easy to follow? |
|
By the way, I've also noticed we have |
|
I'm just curious how things work ;) But yea, without an action, it's bash-magic. |
|
yes, sure! would you be ok with merging this pr or do you want me to use bash? i d prefer PR but dont mind writing bash hehe 😊 |
|
I can't (not an infra guy) :) |
|
if you're comfortable vouching for this action then an approval is welcome even if you're no committer on this repo |
snazy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave it a try.
I'm not a typescript guru, but I couldn't find anything in the action's code base that looks suspicious - like "interesting" exec or GH API calls or the like.
The workflows they have look good to me, nothing obvious that looks like a way to inject malicious code into the build or the like. But I haven't looked into the actions they depend on.
Tests look reasonable, with a reasonable test (case) coverage.
The project itself has quite a variety of contributors and seems overall quite mature.
TL;DR haven't found any "red flags"
|
@raboof is there anything else you'd like me to do in this PR? 🙂 |
This might not be relevant to the use case here, but please note that one of the stated remediation actions for PAT tokens for the
I think that PR resolves an issue where use of the In other words: a false-positive warning is emitted when using the parameter. Even so, yes, it would be nice to resolve that warning. |
hmm i m pretty sure it doesn't work without the input properly added: apache/datafusion-sandbox@d04372a#diff-73e17259d77e5fbef83b2bdbbe4dc40a912f807472287f7f45b77e0cbf78792dR58 |
Ok; my experience was that it worked correctly for a use case to skip GitHub Actions checks on commits that only modify documentation: openculinary/openfoodfacts-server#6 (that was following some of the example documentation from the action itself) |
|
What about |
@madrob that feature is certainly useful and can handle many use cases, but, to the best of my knowledge, the smallest GitHub Actions unit it can be used to trigger-or-skip is an entire job -- meanwhile, (in the OpenFoodFacts PR linked, that was one of the constraints for the use-case) |
|
NB also: there is a possible implementation pattern to copy for use of |
Path filtering doesn't work with merge queues: https://github.com/orgs/community/discussions/45899 |
Yeah, that's a fair point. But even in that repo you've referenced, the team switched to
|
It seemed buggy - but I believe that that was because we were using an old version of it at the time. My understanding, in more detail: Initially we tried to enable a However, further investigation noticed that we had been using a Upgrading to the |
Request for adding a new GitHub Action to the allow list
Overview
I want to add this action, because for Datafusion we need a way to check if the PR has touched some files, and Merge Queue doesn't work with
paths-ignoreName of action: tj-actions/changed-files
URL of action: https://github.com/tj-actions/changed-files
Version to pin to (hash only):
24d32ffPermissions
Action can work with read only access
Related Actions
There's a similar one https://github.com/Ana06/get-changed-files already in the list, but I believe it's not maintained
Checklist
You should be able to check most of these boxes for an action to be considered for review.
Please check all boxes that currently apply: