fix: address zizmor security audit findings with auto-fix in GitHub workflows - #2824
Open
Venkaiahbabuneelam wants to merge 1 commit into
Open
fix: address zizmor security audit findings with auto-fix in GitHub workflows#2824Venkaiahbabuneelam wants to merge 1 commit into
Venkaiahbabuneelam wants to merge 1 commit into
Conversation
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.
Overview
This PR addresses security findings identified by zizmor static analysis in GitHub Actions workflows.
🛡️ What Was Changed and Why?
1. Pinned GitHub Actions to Full Commit SHAs (
unpinned-uses)@v4,@v5,@v8,@v10) with immutable 40-character commit hashes for all external actions across workflows (actions/checkout,actions/setup-python,actions/stale, andactions/github-script), preserving version tags as comments.2. Restricted Credential Persistence (
artipacked)persist-credentials: falseonactions/checkoutacross read-only workflow jobs (import.ymlandmypy.yml).actions/checkoutwrites runnerGITHUB_TOKENcredentials to local disk (.git/config). Disabling credential persistence prevents token exfiltration or artifact poisoning if build scripts or downstream dependencies are compromised.3. Configured Least-Privilege Permissions (
excessive-permissions)permissions: contents: readblocks across read-only jobs (import.ymlandmypy.yml).📊 Modified Files Summary
.github/workflows/import.ymlcheckout&setup-pythonSHAs +persist-credentials: false+permissions: contents: read.github/workflows/mypy.ymlcheckout&setup-pythonSHAs +persist-credentials: false+permissions: contents: read.github/workflows/stale.ymlactions/staleto exact commit SHA.github/workflows/google-contributor-stale.ymlactions/staleto exact commit SHA.github/workflows/block_major_releases.ymlactions/github-scriptto exact commit SHA📈 Zizmor Audit Results Comparison
29 findings(7 High, 4 Medium, 18 Suppressed)20 findings(0 High, 0 Medium, 18 Suppressed) (with manual permission additions)unpinned-usesfindings, Low-severityartipackedfindings, and 2 Medium-severityexcessive-permissionsfindings across 5 workflow files.✅ Verification & Safety