ci: add Zizmor - #5234
Conversation
I'm kinda bikeshedding here but can you change this from 5 to 60? We basically never want to update except that old versions eventually get deleted and then our CI breaks. So we might as well drag our feet for a couple months, which should shake out even accidental security vulns. |
Makes total sense. Ok, moved from EDIT: and rebased (because it is always good to rebase) |
|
|
||
| jobs: | ||
| zizmor: | ||
| name: zizmor latest via PyPI |
There was a problem hiding this comment.
Does this mean that zimor only gives github actions attack protection until the project on PyPI gets pwned?
There was a problem hiding this comment.
Yes, but to be fair they do attestations: https://github.com/zizmorcore/zizmor/blob/57f910252f4931fcb3cdf5fccdb9a0174e264819/.github/workflows/release-pypi.yml#L153-L179
Which is stronger than just PGP-signing and then releasing on PyPI.
See: https://blog.trailofbits.com/2024/11/14/attestations-a-new-generation-of-signatures-on-pypi/
|
Do we really want to run this on every PR? |
I can do a custom trigger only if the PR touches the EDIT: just saw this #5237 |
|
Cool! I didn't realize it was so easy to gate jobs on paths. |
|
rebased |
|
f*** annoying rebase sorry about the spam... |
This PR integrates
zizmorfor automated GitHub Actions security analysis and implements several
workflow security improvements.
zizmorIntegrationNew workflows that runs
zizmor:.github/workflows/cron-zizmor.yml:.github/workflows/zizmor.ymlthat runszizmoron every PR that fails CI ifzizmorfails.These are the suggested ways to integrate
zizmorto a repository using GitHub Actions in the documentation.CI Security Hardening
All workflows were updated with
zizmor's security best practices:Action pinning: All GitHub Actions are now pinned to specific commit hashes instead of tags that provide mmutability and protection against supply chain attacks
actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8instead of@v5Permissions: Added explicit
permissionsblocks to all workflowsCredential persistence: Set
persist-credentials: falseon allactions/checkoutstepsDangerous Triggers Whitelist
zizmorflagged the use ofpull_request_targetandworkflow_runin as dangerous trigger patterns. Hence, I've added
# zizmor: ignore[dangerous-triggers]annotations to whitelist these patterns.Dependabot Enhancements
Cooldown feature: Added
cooldown.default-days: 5to.github/dependabot.yml.Tagged hash support: Dependabot can work correctly with pinned action versions (commit hashes) and will update them accordingly by pinning a new hash (and changing the commented version accordingly as well).
Closes #5209.