Skip to content

chore: Harden CI supply chain#29226

Open
erezrokah wants to merge 1 commit intooven-sh:mainfrom
erezrokah:claude/supply-chain-hardening
Open

chore: Harden CI supply chain#29226
erezrokah wants to merge 1 commit intooven-sh:mainfrom
erezrokah:claude/supply-chain-hardening

Conversation

@erezrokah
Copy link
Copy Markdown

@erezrokah erezrokah commented Apr 12, 2026

Summary

Pin third-party GitHub Action to SHA and enforce frozen lockfiles in CI workflows, complementing #28616.

Changes Made (CI Fixes)

Recommendations

These items require manual follow-up and are NOT included as code changes in this PR.

  • Configure Dependabot with cooldown setting, or Renovate with minimumReleaseAge — no automated dependency update tooling is currently configured
  • Pin docker/* actions to SHA in release.yml
  • Pin ruby/setup-ruby to SHA in release.yml
  • Pin getsentry/action-release to SHA in release.yml
  • Pin oven-sh/setup-bun to SHA in update-root-certs.yml and update-vendor.yml
Why This Matters

GitHub Actions tag references are mutable

When a workflow references an action by tag (e.g., actions/checkout@v4), the tag can be moved to point to a different commit at any time — by the maintainer, or by an attacker who compromises the repository. SHA pinning makes the reference immutable.

Real-world incidents:

  • Trivy (CVE-2026-33634) — compromised GitHub Action allowed arbitrary code execution in CI pipelines.
  • KICS (CVE-2026-33634, writeup) — supply chain attack on the KICS GitHub Action used for infrastructure-as-code scanning.
  • LiteLLM (CVE-2026-33634, advisory) — compromised action in the LiteLLM project's CI pipeline.
  • tj-actions/changed-files (CVE-2025-30066) — attacker compromised the action and rewrote version tags to inject credential-stealing code. Every repo using a tag reference silently ran the malicious version.
  • reviewdog (CVE-2025-30154) — similar tag-rewriting attack on a widely-used code review action.

Unfrozen lockfiles in CI enable dependency confusion

Without --frozen-lockfile (or bun ci), a CI install can silently resolve newer package versions than what's in the lockfile. If an attacker publishes a compromised version of a dependency, CI would pick it up on the next run.

Real-world incidents:

  • Axios npm compromise impacting OpenAI (2026) — compromised axios package affected OpenAI and other major consumers.
  • PyTorch torchtriton (2022) — attacker published a malicious package to PyPI that shadowed an internal dependency, exfiltrating environment variables.
  • colors.js (CVE-2021-23567, 2022) — maintainer deliberately corrupted the package, causing infinite loops in downstream projects.
  • ua-parser-js (GHSA-pjwm-rvh2-c87w, 2021) — compromised npm package with cryptominer, affecting millions of weekly downloads.
  • event-stream (GHSA-mh6f-8j2x-4483, 2018) — attacker gained maintainer access and injected a targeted cryptocurrency-stealing payload.

Pin peter-evans/create-pull-request to SHA in bump action (missed by oven-sh#28616), and replace all `bun install` with `bun ci` in CI workflows to enforce frozen lockfile.
@erezrokah erezrokah marked this pull request as ready for review April 12, 2026 13:46
Copilot AI review requested due to automatic review settings April 12, 2026 13:46
Copy link
Copy Markdown
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 12, 2026

Walkthrough

Updated multiple GitHub Actions workflows to use bun ci instead of bun install for dependency installation, and pinned the peter-evans/create-pull-request action to a specific commit SHA instead of the @v7 tag.

Changes

Cohort / File(s) Summary
GitHub Action Pinning
.github/actions/bump/action.yml
Pinned peter-evans/create-pull-request to a specific commit SHA (v7) instead of the @v7 tag reference.
Workflow Dependency Installation
.github/workflows/format.yml, .github/workflows/packages-ci.yml, .github/workflows/release.yml, .github/workflows/vscode-release.yml
Standardized dependency installation across multiple CI/CD workflows by replacing bun install with bun ci in setup and dependency installation steps.
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'chore: Harden CI supply chain' is concise, clear, and directly summarizes the main objective of the changeset—strengthening CI security through action pinning and frozen lockfiles.
Description check ✅ Passed The PR description comprehensively covers what changes were made and the rationale, but lacks explicit verification details.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hardens CI supply chain by (1) making a previously tag-pinned third-party action immutable via SHA pinning and (2) preventing lockfile drift during CI installs by switching workflows from bun install to bun ci.

Changes:

  • Pin peter-evans/create-pull-request@v7 to a full commit SHA in the internal .github/actions/bump composite action.
  • Replace bun install with bun ci across CI/release workflows to enforce frozen lockfile behavior.
  • Update VS Code extension publish workflow to use bun ci for dependency installs (including inspector protocol build step).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/vscode-release.yml Switch dependency installs to bun ci for VS Code extension publishing flow
.github/workflows/release.yml Replace bun install with bun ci in multiple release jobs
.github/workflows/packages-ci.yml Use bun ci for root + package dependency installs in packages CI
.github/workflows/format.yml Enforce frozen installs via bun ci in formatting workflow
.github/actions/bump/action.yml SHA-pin peter-evans/create-pull-request invocation inside internal bump action

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 72 to 76
with:
bun-version: "1.2.3"
- name: Install Dependencies
run: bun install
run: bun ci
- name: Sign Release
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

release.yml still references peter-evans/create-pull-request by mutable tag (@v7) later in the workflow (e.g., the DefinitelyTyped PR step). Since this PR is hardening CI supply chain, consider SHA-pinning that remaining usage as well (and keeping the # v7 comment) so the workflow is consistently protected against tag-rewrite compromises.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't want to step on #28616 toes (see description)

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.

2 participants