ci(zizmor): gate PRs on medium+ findings and clear existing ones - #30797
Conversation
Switch the zizmor check to fail on any finding at medium severity or above (advanced-security off, min-severity medium, annotations on) so it can be promoted to a required check, and pin the engine to zizmor 1.24.1 through zizmor-action v0.5.6 for deterministic runs. Clear the findings that were outstanding so the check passes: correct mismatched action pin version comments, scope the proxy endpoint workflow's id-token and pull-requests permissions to the jobs that use them, and mark the server-root-path docker build as non-publishing while dropping its shared gha build cache.
…itellm_/cranky-spence-7a4aad
Greptile SummaryThis PR hardens GitHub Actions security by converting the zizmor workflow scanner from a passive reporter into a blocking gate, and fixes several least-privilege and cache-poisoning issues flagged by it.
Confidence Score: 5/5Workflow-only changes that tighten permissions and fix a cache-poisoning exposure; no application code is touched. All six files are GitHub Actions workflow configuration. The changes follow well-established GitHub Actions hardening patterns (job-scoped permissions, no GHA cache writes in untrusted fork contexts, fail-fast security scanners). No logic is altered that could break application behavior. No files require special attention. Note that zizmor becoming a blocking check only takes effect once added as a required status check in branch protection rules for
|
| Filename | Overview |
|---|---|
| .github/workflows/zizmor.yml | Drops SARIF upload permissions, pins zizmor to 1.24.1 via v0.5.6 SHA, and enables fail-fast mode so the job now gates PRs instead of silently passing. |
| .github/workflows/test-unit-proxy-endpoints.yml | Moves id-token: write and pull-requests: write from workflow-level to per-job permissions, applying least-privilege so future jobs don't inherit elevated permissions by default. |
| .github/workflows/test_server_root_path.yml | Removes GHA build-cache read/write from the pull_request-triggered Docker build step and makes push: false explicit, eliminating an untrusted-fork cache-poisoning vector. |
| .github/workflows/codeql.yml | Comment-only fix: corrects the three # v3 tags to # v3.34.1; pinned SHAs are unchanged. |
| .github/workflows/check-ui-api-types.yml | Comment-only fix: corrects # v5.0 to # v5.0.0 for actions/setup-node; SHA is unchanged. |
| .github/workflows/test-litellm-ui-build.yml | Comment-only fix: corrects two # v5.0 tags to # v5.0.0 for actions/setup-node; SHAs are unchanged. |
Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'origin/lit..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
mateo-berri
left a comment
There was a problem hiding this comment.
LGTM; thanks! Glad it's actually doing something now lol
…riAI#30797) Switch the zizmor check to fail on any finding at medium severity or above (advanced-security off, min-severity medium, annotations on) so it can be promoted to a required check, and pin the engine to zizmor 1.24.1 through zizmor-action v0.5.6 for deterministic runs. Clear the findings that were outstanding so the check passes: correct mismatched action pin version comments, scope the proxy endpoint workflow's id-token and pull-requests permissions to the jobs that use them, and mark the server-root-path docker build as non-publishing while dropping its shared gha build cache.
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
make test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewThis PR changes GitHub Actions workflow configuration only, with no application code, so there are no unit tests to add and
make test-unitis not the relevant check. Verification is the zizmor run shown below plus the branch CI runCI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Screenshots / Proof of Fix
The zizmor job today uploads findings to code scanning and always exits green, so it cannot block anything. This makes it gate instead, then clears the findings that were already open so the gate passes. Verified locally with the exact engine the action runs (zizmor 1.24.1, regular persona, medium threshold)
The gate still blocks a fundamentally insecure trigger, so it keeps real signal:
Type
🚄 Infrastructure
Changes
The zizmor check runs with
advanced-security: false,min-severity: mediumandannotations: true, so it fails on any finding at medium or above and surfaces them as inline PR annotations. Thesecurity-events: writeandactions: readpermissions are dropped since nothing is uploaded anymore, leaving onlycontents: read. Once this lands, the check can be promoted to a required check for merges intolitellm_internal_stagingThe engine is pinned to zizmor 1.24.1 through zizmor-action v0.5.6 (SHA pinned), so runs are deterministic rather than tracking whatever the action's bundled
latestresolves to. 1.24.1 also scopes thesecrets-outside-envaudit to the auditor persona, so env-mapped secrets in the triage and helper workflows are no longer reported at the regular persona this check usesTo make the gate pass, the previously open findings are cleared. Mismatched action pin version comments are corrected to the exact tag each SHA resolves to (
# v3to# v3.34.1for the CodeQL actions,# v5.0to# v5.0.0for setup-node, and the buildx and build-push comments in the server-root-path workflow). The proxy endpoints workflow no longer grantsid-token: writeandpull-requests: writeat the workflow level; those move to the two jobs that actually call the reusable test workflow. The server-root-path docker build is markedpush: falseand no longer reads or writes the sharedtype=ghabuild cache, which removes the only writer of that cache from an untrusted pull_request contextNo application code changes; this is workflow configuration only