Hash pin GitHub Actions - #173
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #173 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 547 558 +11
Branches 74 43 -31
=========================================
+ Hits 547 558 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Yet another, this time via template injection: Will merge this, then open another to add https://github.com/zizmorcore/zizmor to pre-commit and fix its findings. |
|
Have any of the standard actions like Should I hash pin all actions, including the standard ones, in my projects too? Any tips how to mitigate the maintenance trouble that may cause? e.g. is there a specific dependabot configuration or other automation you would recommend, aside from that uvx command? |
I don't think they have, but I find it easier to pin them all together, and update them all together. One less thing to worry about and configure.
Yes.
Update with either Dependabot or Renovate, they're both good. For Dependabot, I recommend something like https://github.com/python/cpython/blob/main/.github/dependabot.yml which has:
I also recommend running zizmor and fixing the findings, and then putting it in your CI. https://zizmor.sh/ |
|
Thanks a lot for the advice, I will do that. I'm aware of zizmor, and fixed all the template-injection warnings some time ago. I don't think any of them was actually attacker-controllable, but important to avoid all the same. There are some other warnings that I'm not so sure how to fix though, without potentially going through a lot of breakage first (e.g. default permissions warnings). |
|
I've started hash-pinning all actions across my projects: pypdfium2-team/gn-dist@983db9e, pypdfium2-team/ctypesgen@7d7fc4c. Also pypdfium2-team/pypdfium2@83ea72e once pypdfium2-team/pypdfium2#461 is merged. I've set monthly updates + a cooldown of 10 days for now. Let's see how that goes. If it still annoys me, I might go for quarterly + 14 days. |
|
It is taxing, which is why large organizations allow (with some caveats/exceptions) dependency updates to be automatically merged if CI passes. |
Yet another compromise via unpinned GitHub Actions: https://socket.dev/blog/bitwarden-cli-compromised
Let's hash-pin GHA.
Done via
uvx gha-update.