THRIFT-5965: Added zizmor to run static analysis on GitHub actions#3441
Merged
kpumuk merged 1 commit intoapache:masterfrom May 3, 2026
Merged
THRIFT-5965: Added zizmor to run static analysis on GitHub actions#3441kpumuk merged 1 commit intoapache:masterfrom
kpumuk merged 1 commit intoapache:masterfrom
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zizmor is a static analysis tool for GitHub Actions. It can find and fix many common security issues in typical GitHub Actions CI/CD setups. See https://docs.zizmor.sh/
Note
ASF Infrastructure recommends running zizmor static analysis on GitHub Actions workflows to detect security issues (see GitHub Actions Security).
Our workflows had a few common themes, which were addressed:
zizmor .initially reported 63 findings, including 37 pre-existing suppressed findings and 26 active findings. This change addresses all active findings; the finalzizmor .run reports no findings, with the same 37 suppressed findings still suppressed.Dependabot Cooldown
Findings:
.github/dependabot.yml:dependabot-cooldownwarned that thegithub-actions,gradleforlib/java, andgradleforlib/kotlinupdaters had no cooldown.Remediation:
cooldown.default-days: 7to each updater so Dependabot waits before opening updates for freshly released dependencies.Checkout Credential Persistence
Findings:
artipackedwarned that checkout steps did not explicitly disable persisted GitHub credentials in.github/workflows/build.yml,.github/workflows/cmake.yml,.github/workflows/msvc.yml,.github/workflows/pypi.yml,.github/workflows/release_rust.yml, and.github/workflows/sca.yml.Remediation:
with: persist-credentials: falseto affectedactions/checkoutsteps that do not need to push back to the repository.Release Cache Poisoning
Findings:
.github/workflows/release_ruby.yml:cache-poisoningwarned that the Ruby release workflow restored Bundler cache state before publishing the gem.Remediation:
bundler-cachefor the Ruby release job so publish-time artifacts are not built or released from restored CI cache state.Unpinned Action Reference
Findings:
.github/workflows/asf-allowlist-check.yml:unpinned-useswarned thatapache/infrastructure-actions/allowlist-check@mainused a mutable branch reference.Remediation:
8056239fafd626c8a4e2d6679506ba0d8e60f196.Rust Release Permissions and Publishing Token
Findings:
.github/workflows/release_rust.yml:excessive-permissionswarned that the publish job used default permissions..github/workflows/release_rust.yml:use-trusted-publishingrecommended replacing the long-livedCARGO_REGISTRY_TOKENsecret with trusted publishing.Remediation:
contents: readandid-token: write.rust-lang/crates-io-auth-action, pinned to commitbbd81622f20ce9e2dd9622e3218b975523e45bbe, and passed the action's temporary token tocargo publish.[skip ci]anywhere in the commit message to free up build resources.