Harden CI

Merged
VI
2mo ago
+479-117
  • Do not restore the Rust and npm caches in build-js-binaries and build-wasm on tag and release runs, as these jobs build the native binaries and wasm published to npm.
  • Install cargo-fuzz with a pinned version and --locked, so that its dependencies are the ones from its published lockfile.
  • Install twine from uv.lock (new build dependency group) instead of uvx, and check wheels integrity with unzip -t in inspect-python-assets.
  • Verify the uv installer provenance with gh attestation verify on the host before running it in the manylinux container of the PGO runtime wheel build, instead of piping curl to sh.
  • Remove the unused contents: write permission from the npm release job.
  • Scope the id-token: write permission to the CodSpeed job instead of the whole workflow.
  • Disable the uv cache in the PyPI release job.
  • Update all GitHub Actions to the commit of their latest release, with matching version comments (except dtolnay/rust-toolchain, which has no release versioning). This includes major bumps of actions/checkout, actions/setup-node, actions/setup-python, astral-sh/setup-uv, CodSpeedHQ/action, codecov/codecov-action and j178/prek-action.

Summary by cubic

Hardens the CI pipeline against supply chain attacks: release jobs no longer trust cached or unpinned tooling, the uv installer is provenance-checked, and workflow permissions are narrowed.

Supply chain hardening

  • Skip Rust and npm cache restores in build-js-binaries and build-wasm on tag and release runs, since these jobs publish the native binaries and wasm.
  • Pin cargo-fuzz to 0.13.2 and install with --locked, so its dependencies come from its published lockfile.
  • Install twine from the new build dependency group in uv.lock instead of uvx, and check every wheel's zip integrity with unzip -t before release.
  • Verify the uv installer with gh attestation verify on the host before running it in the manylinux container of the PGO runtime wheel build.
  • Remove the unused contents: write permission from the npm release job, scope id-token: write to the CodSpeed job only, and disable the uv cache in the PyPI release and inspect-python-assets jobs.

Dependencies

  • Update all GitHub Actions to their latest release commits, including major bumps of actions/checkout, actions/setup-node, actions/setup-python, astral-sh/setup-uv, CodSpeedHQ/action, codecov/codecov-action, and j178/prek-action.
  • Add Dependabot for GitHub Actions with a monthly schedule.