HBASE-29893 Add zizmor for GitHub Actions workflows security analysis#7742
HBASE-29893 Add zizmor for GitHub Actions workflows security analysis#7742ndimiduk wants to merge 2 commits intoapache:masterfrom
Conversation
|
Heya @gmcdonald should we add zizmor to the list of authorized actions? Seems kinda silly that this is the prescribed tool. |
5371b93 to
e42dbee
Compare
e42dbee to
4b8819f
Compare
4b8819f to
31fa0b0
Compare
I'll take a look |
I think we should indeed. But It's not silly, because you can use zizmor in multiple ways in GH Actions - for example in Airflow we use it in https://github.com/apache/airflow/blob/main/.pre-commit-config.yaml#L329 I guess it was waiting here for the first person who will want to use it via actions to add it to allowlist - which is not silly, rather expected (and just happened) |
|
And BTW @ndimiduk -> you are absolutely free to make PR to request adding it to allowlist, which is how the whole workflow is designed someone wants to use actions -> make PR -> infra accepts it. |
| steps: | ||
| - name: Checkout HBase | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@v4 # zizmor: ignore[unpinned-uses] |
There was a problem hiding this comment.
Pity that we need to add this everywhere...
This is the suggested way for github actions usage but not recommanded in zizmor rules?
There was a problem hiding this comment.
BTW. we are using octopin prek hook from eclipse that is keeping actions updated to have hash-commits https://github.com/apache/airflow/blob/a9df1220b8a62aff9e6c0004de0624051a937a91/.pre-commit-config.yaml#L33 - this is nice because it keeps the "tag" version in comment and will propose an update when we run it and then we can review the changes coming and commit it.
Also zizmor can be configured to ignore certain actions or relax their rules https://docs.zizmor.sh/audits/#rulesunpinned-usesconfigpolicies - they even have example how to configure it to skip pinning for github-owned "/actions/" - which is fine according to ASF rules, but we opted not to do it as octopin makes it super easy to keep hash-commit for all actions.
ASF Infrastructure recommends running zizmor static analysis on GitHub Actions workflows to detect security issues (see https://cwiki.apache.org/confluence/display/BUILDS/GitHub+Actions+Security).