Skip to content

[Infra] Pins GitHub Action workflows to specific hashes#24594

Merged
yuneng-berri merged 3 commits intomainfrom
litellm_gha_pin_helm
Mar 26, 2026
Merged

[Infra] Pins GitHub Action workflows to specific hashes#24594
yuneng-berri merged 3 commits intomainfrom
litellm_gha_pin_helm

Conversation

@yuneng-berri
Copy link
Copy Markdown
Collaborator

Relevant issues

Github script: actions/github-script@f28e40c
CodSpeed: CodSpeedHQ/action@1c8ae48
Setup Helm: Azure/setup-helm@1a275c3
Checkout v4: actions/checkout@08eba0b
Setup Python: actions/setup-python@a26af69

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🚄 Infrastructure

Changes

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Mar 26, 2026 0:48am

Request Review

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq bot commented Mar 26, 2026

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing litellm_gha_pin_helm (b90a0af) with main (0d2b454)

Open in CodSpeed

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 26, 2026

Greptile Summary

This PR hardens the repository's CI/CD supply chain by pinning all GitHub Actions to specific commit SHAs instead of mutable version tags, preventing dependency substitution attacks. Eight workflow files are updated across automation, security scanning, benchmarking, and release workflows.

  • Security improvement: All actions/checkout, actions/setup-python, actions/github-script, CodSpeedHQ/action, azure/setup-helm, github/codeql-action/*, and wow-actions/potential-duplicates usages are now pinned to immutable commit hashes with the version tag preserved as a comment for readability.
  • Version upgrades alongside pinning: Several workflows also receive version upgrades (e.g. checkout@v2/v3 → v4.3.0, azure/setup-helm@v1 → v4.3.1), which is intentional and safe.
  • New integrity verification step in helm_unit_test.yml: A shell-based check was added to verify the installed helm-unittest plugin's commit SHA — however, the plugin directory path $(helm env HELM_PLUGINS)/helm-unittest is incorrect; Helm names the directory after the plugin's name field in plugin.yaml, which for helm-unittest is unittest. This will cause the verification step (and the entire Helm unit test workflow) to fail on every run.

Confidence Score: 3/5

  • Good security initiative, but the Helm plugin integrity check will break CI on every run until the directory name is corrected.
  • The vast majority of the changes are a straightforward and correct application of SHA-pinning best practices. The one concrete bug — the helm-unittest vs unittest directory name in the plugin integrity verification step — will cause the Helm unit test job to always fail with a non-zero exit, blocking PRs and main pushes. This is not a critical security issue but is a clear CI reliability regression that should be fixed before merge.
  • .github/workflows/helm_unit_test.yml — the PLUGIN_DIR variable on line 27 uses the wrong directory name.

Important Files Changed

Filename Overview
.github/workflows/helm_unit_test.yml Pins checkout (v2→v4.3.0) and setup-helm (v1→v4.3.1) to commit hashes; adds a plugin integrity verification step that references an incorrect directory name (helm-unittest instead of unittest), which will break CI.
.github/workflows/codeql.yml Pins checkout, codeql-action/init, and codeql-action/analyze to specific commit hashes; both CodeQL actions correctly share the same monorepo commit hash (ebcb5b36). The previously flagged double-@@ issue is absent from the current diff.
.github/workflows/codspeed.yml Pins checkout, setup-python, and CodSpeedHQ/action to specific commit hashes matching versions cited in the PR description; no issues found.
.github/workflows/check_duplicate_issues.yml Pins wow-actions/potential-duplicates, checkout, and setup-python to commit hashes; the version bump from v1→v1.1.0 for potential-duplicates is intentional and safe alongside the pinning.
.github/workflows/auto_update_price_and_context_window.yml Upgrades and pins checkout from v3 to v4.3.0 commit hash; also adds a missing newline at end of file.
.github/workflows/create_daily_staging_branch.yml Upgrades both checkout steps from v3 to v4.3.0 commit hash; minor YAML quoting style normalisation. No issues.
.github/workflows/issue-keyword-labeler.yml Pins checkout and both github-script usages to commit hashes; also fixes minor YAML indentation for the issues trigger type. No issues.
.github/workflows/label-component.yml Single-line change pinning github-script from @v7 to the commit hash; straightforward and safe.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[GitHub Event Trigger] --> B{Workflow}

    B --> C[helm_unit_test.yml]
    B --> D[codeql.yml]
    B --> E[codspeed.yml]
    B --> F[check_duplicate_issues.yml]
    B --> G[issue-keyword-labeler.yml / label-component.yml]
    B --> H[auto_update_price... / create_daily_staging...]

    C --> C1["actions/checkout@08eba0b # v4.3.0"]
    C1 --> C2["azure/setup-helm@1a275c3 # v4.3.1"]
    C2 --> C3["helm plugin install helm-unittest v0.4.4"]
    C3 --> C4["Verify plugin SHA\n(PLUGIN_DIR = HELM_PLUGINS/helm-unittest ❌\nshould be HELM_PLUGINS/unittest)"]
    C4 -->|"exit 1 — wrong path"| FAIL["CI Failure"]
    C4 -->|"if path correct"| C5["helm unittest tests"]

    D --> D1["actions/checkout@08eba0b # v4.3.0"]
    D1 --> D2["codeql-action/init@ebcb5b3 # v3"]
    D2 --> D3["codeql-action/analyze@ebcb5b3 # v3"]

    E --> E1["actions/checkout@08eba0b # v4.3.0"]
    E1 --> E2["setup-python@a26af69 # v5.6.0"]
    E2 --> E3["CodSpeedHQ/action@1c8ae48 # v4.12.1"]

    F --> F1["potential-duplicates@4d4ea03 # v1.1.0"]
    F1 --> F2["actions/checkout@08eba0b # v4.3.0"]
    F2 --> F3["setup-python@a26af69 # v5.6.0"]

    G --> G1["actions/checkout@08eba0b # v4.3.0"]
    G1 --> G2["actions/github-script@f28e40c # v7.1.0"]

    H --> H1["actions/checkout@08eba0b # v4.3.0"]
Loading

Reviews (2): Last reviewed commit: "remove extra @" | Re-trigger Greptile

Comment thread .github/workflows/codeql.yml Outdated
@yuneng-berri yuneng-berri merged commit 437341c into main Mar 26, 2026
37 of 83 checks passed
@yuneng-berri yuneng-berri deleted the litellm_gha_pin_helm branch March 26, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants