fix: pin 8 unpinned action(s) to commit SHAs#5209
Conversation
Automated security fixes applied by Runner Guard (https://github.com/Vigilant-LLC/runner-guard). Changes: .github/workflows/ci-sage.yml | 2 +- .github/workflows/main.yml | 12 ++++++------ .github/workflows/pyright.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)
|
FTR, the OP is known to mass-post slop. It'd be far more useful to configure Zizmor properly. |
|
Hey @webknjaz, I'd encourage you to actually look at the changes before assuming it's slop. The PR pins 8 actions to commit SHAs across 3 workflow files, including tj-actions/changed-files which was compromised in a real supply chain attack earlier this year. Feel free to close it if you're not interested, but you might want to check with some of the projects that did take a look. next.js, svelte, metabase, keras, webpack, lazygit, apache/superset, and others have all merged similar hardening PRs after reviewing them. As for Zizmor, great tool, we use it too. But configuring a linter and actually fixing the findings are two different things. This PR is the fix. Feel free to close if you're out on it.
|
Summary of changes
This PR hardens CI/CD workflows against supply chain attacks by pinning 8 third-party GitHub Actions to immutable commit SHAs across 3 workflow files. All changes are mechanical and preserve existing workflow behavior.
Of particular note: This repository currently references
tj-actions/changed-files@v46(used twice inmain.yml) andcodecov/codecov-action@v4(used twice inmain.yml). Both of these actions have been previously compromised in real supply chain attacks:Pinning these to commit SHAs ensures that even if these actions are compromised again, the pinned SHA cannot be changed and your workflows will continue to reference the known-good version.
Fixes applied
ci-sage.ymlmain.ymlpyright.ymlWhy this change
I've been scanning the top 50,000 GitHub repositories for CI/CD pipeline vulnerabilities over the last 5 weeks as part of an ongoing research effort into the supply chain attack campaign that started with tj-actions in March and has escalated through multiple phases since, where attackers compromise maintainer accounts and force-push malicious code to mutable action tags - every downstream project referencing those tags then executes the attacker's code with full access to secrets and deployment credentials.
You may notice that I have opened up a lot of PRs - don't take that as a negative. I've been working around the clock on this and monitoring all comms. It may take me an hour or two to get back to a comment you leave.
How to verify
Every change is mechanical and preserves workflow behavior:
action@v3becomesaction@abc123 # v3- original version preserved as commentI've had 22 merges so far. I created a tool called Runner Guard to assist in my research - it does mechanical, non-AI fixes to reduce hallucinations to zero and produce consistent fixes. If you would like to scan it yourself to validate my work, feel free.
Happy to answer any questions - I'm monitoring comms on every PR.
- Chris Nyhuis (dagecko)
Pull Request Checklist
newsfragments/. - N/A for CI security hardening, no functional code changes.