|
|
|
|
|
by cyrnel
400 days ago
|
|
This has some good advice, but I can't help but notice that none of this solves a core problem with the tj-actions/changed-files issue: The workflow had the CAP_SYS_PTRACE capability when it didn't need it, and it used that permission to steal secrets from the runner process. You don't need to audit every line of code in your dependencies and their subdependencies if your dependencies are restricted to only doing the thing they are designed to do and nothing more. There's essentially nothing nefarious changed-files could do if it were limited to merely reading a git diff provided to it on stdin. Github provides no mechanism to do this, probably because posts like this one never even call out the glaring omission of a sandboxing feature. |
|
The problem with these "microprograms" have always been that once you delegate so much, once you are willing to put in that little effort. You can't guarantee anything.
If you are willing to pull in a third party dependency to run git diff, you will never research which permissions it needs. Doing that research would be more difficult than writing the program yourself.