Repository navigation
[cherry-pick][2.60.0][ci] Pin pip 26.2.2 and uv 0.13.4 in Windows/macOS wheel builds for eMudhra CA compromise (#67298) - #67346
Conversation
…Mudhra CA compromise (#67298) ## Why Follow-up to #67295 (Linux images) for the eMudhra intermediate CA compromise (https://emudhra.we-have-a-problem.com/). The Windows and macOS wheel builds run pip 25.2, which trusts its own vendored certifi (2025.7.14, still includes `emSign ECC Root CA - G3`) as well as the system store. `python/setup.py` uses that pip to download the vendored thirdparty packages (psutil, colorama, aiohttp, idna) without hash checking, so build-time downloads should not trust the compromised intermediates. The shipped wheels themselves need no change: they vendor no pip/certifi/CA bundle, `requests` and `virtualenv` are not capped, and Ray's gRPC TLS uses the user's `RAY_TLS_CA_CERT`. ## What | File | Change | |---|---| | `python/build-wheel-windows.sh` | `uv run --with pip==25.2` → `pip==26.2.2` | | `ci/ray_ci/windows/build_base.sh` | uv 0.9.22 → 0.13.4 (`build_base.sh` already updates conda `ca-certificates`/`certifi`) | | `python/build-wheel-macos.sh` | conda `pip=26.2.2` on 3.11–3.14; 3.10 keeps conda `pip=25.2` and upgrades to 26.2.2 from PyPI | | `ci/build/test-macos-wheels.sh` | same split on the arm64 conda path (it already runs `pip install -U pip` afterwards) | conda-forge pip 26.2.2 builds require python>=3.11, but the PyPI release supports 3.10. Dry-run solves (`conda create --dry-run --platform osx-arm64|osx-64`) succeed for python 3.10 + pip 25.2 and 3.11–3.14 + pip 26.2.2 (resolving python 3.13.17 / 3.14.9); python 3.10 + pip 26.2.2 fails. ## Not covered - CI test locks for Windows/macOS still carry the `uv==0.8.9` python package and `virtualenv==21.2.4` (test environments only); certifi in those locks is bumped in #67295. - pip-tools / Bazel pip / CI Linux Dockerfiles stay in #67203. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit 1ac3334) Signed-off-by: Sai Miduthuri <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request upgrades pip to version 26.2.2 across macOS and Windows wheel build scripts to apply the eMudhra CA fix, with special handling for Python 3.10 on macOS. It also bumps the uv installer version to 0.13.4 on Windows. Feedback suggests using conda run instead of a bare python command when upgrading pip for Python 3.10 on macOS to ensure the command runs reliably within the correct conda environment.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 64607a5. Configure here.
| # python>=3.11, so 3.10 upgrades from PyPI instead. | ||
| if [[ "$PY_MM" == "3.10" ]]; then | ||
| conda install -y python="$PY_MM" pip=25.2 | ||
| python -m pip install pip==26.2.2 |
There was a problem hiding this comment.
Insecure pip bootstrap on 3.10
Medium Severity
The Python 3.10 path upgrades to pip 26.2.2 by running unpinned python -m pip install pip==26.2.2 with conda's pip 25.2. That client still trusts the compromised eMudhra CA, so the upgrade itself can be intercepted before the fixed pip is installed.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 64607a5. Configure here.
…ry Python (#67350) ## Why #67256 capped conda's certifi at `<2026` for Python 3.10 in `docker/base-deps` and `docker/base-slim`, because every conda-forge certifi from 2026 on required `python>=3.11` and the 3.10 downgrade failed with `RemoveError`. That cap makes conda install **certifi 2025.11.12**, which still trusts the compromised eMudhra roots. The py3.10 images only end up patched because the lock install (`certifi==2026.10.19`) overwrites it afterwards. That leaves stale records behind in `rayproject/ray:nightly-py310-cpu`: - `conda-meta/certifi-2025.11.12-pyhd8ed1ab_0.json` - `pkgs/certifi-2025.11.12-.../certifi/cacert.pem` Scanners can flag those, and a later `conda` operation could re-link the old bundle. Since then, conda-forge has patched certifi **2026.10.19** to allow Python 3.10 (conda-forge/conda-forge-repodata-patches-feedstock@d7dcb640, 2026-10-21). It is the only patched build: 2026.10.18 and 2026.10.23 still require 3.11. ## What In both Dockerfiles, pin `certifi=2026.10.19` in the conda step for **every** Python version, matching the lock files. The lock install then finds conda's certifi already correct and leaves it alone, so `conda-meta` and the package cache match what is installed. ```bash CONDA_PIP_SPEC=("pip=26.2.2") if [[ "${PYTHON_VERSION}" == "3.10" ]]; then # conda-forge pip 26.2.2 requires python>=3.11; 3.10 installs it from PyPI below. CONDA_PIP_SPEC=() fi conda install -y ... "certifi=2026.10.19" "${CONDA_PIP_SPEC[@]}" ``` certifi is pinned inline for every version; the 3.10 branch is only about pip. conda-forge pip 26.2.2 still requires `python>=3.11`, with no repodata patch, so 3.10 keeps installing pip 26.2.2 from PyPI after the conda step, as before. ## Testing The test runs in `condaforge/miniforge3:24.11.3-0` (the Dockerfiles' Miniforge). For each Dockerfile, it extracts the edited spec block and `conda install` line, runs them, then runs the 3.10 PyPI pip step and the `certifi` line of that version's `ray_base_deps_py<ver>.lock` with `uv pip install --no-deps`. | | 3.10 | 3.11 | 3.12 | 3.13 | 3.14 | |---|---|---|---|---|---| | base-deps | ✅ | ✅ | ✅ | ✅ | ✅ | | base-slim | ✅ | ✅ | ✅ | ✅ | ✅ | Results for every cell: - `certifi` is 2026.10.19, and `conda-meta` has 2026.10.19. - The lock certifi install is a no-op ("Checked 1 package"). - `pip` is 26.2.2. - conda is 26.7.1 on 3.10 (previously 23.9.0 under the cap), 24.11.3 on 3.12 (unchanged), and 26.9.4 on 3.11/3.13/3.14. On 3.10, conda's pip record stays at 24.3.1 because pip still comes from PyPI there, which is unchanged. The four 3.10–3.12 runs that failed when all ten ran in parallel passed when rerun one at a time, so those failures came from the concurrent solves. This changes the base image inputs, so premerge rebuilds every base image from scratch, which also exercises the change on every Python version. Related: the 2.60 cherry-pick of #67256 (#67320) carries the old `certifi<2026` cap; this change should replace it there. ## Additional information Not a duplicate: open PRs touching certifi/conda are only the 2.60 cherry-picks (#67320, #67322, #67346). AI assistance (Claude Code) was used for this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…ry Python (#67350) ## Why #67256 capped conda's certifi at `<2026` for Python 3.10 in `docker/base-deps` and `docker/base-slim`, because every conda-forge certifi from 2026 on required `python>=3.11` and the 3.10 downgrade failed with `RemoveError`. That cap makes conda install **certifi 2025.11.12**, which still trusts the compromised eMudhra roots. The py3.10 images only end up patched because the lock install (`certifi==2026.10.19`) overwrites it afterwards. That leaves stale records behind in `rayproject/ray:nightly-py310-cpu`: - `conda-meta/certifi-2025.11.12-pyhd8ed1ab_0.json` - `pkgs/certifi-2025.11.12-.../certifi/cacert.pem` Scanners can flag those, and a later `conda` operation could re-link the old bundle. Since then, conda-forge has patched certifi **2026.10.19** to allow Python 3.10 (conda-forge/conda-forge-repodata-patches-feedstock@d7dcb640, 2026-10-21). It is the only patched build: 2026.10.18 and 2026.10.23 still require 3.11. ## What In both Dockerfiles, pin `certifi=2026.10.19` in the conda step for **every** Python version, matching the lock files. The lock install then finds conda's certifi already correct and leaves it alone, so `conda-meta` and the package cache match what is installed. ```bash CONDA_PIP_SPEC=("pip=26.2.2") if [[ "${PYTHON_VERSION}" == "3.10" ]]; then # conda-forge pip 26.2.2 requires python>=3.11; 3.10 installs it from PyPI below. CONDA_PIP_SPEC=() fi conda install -y ... "certifi=2026.10.19" "${CONDA_PIP_SPEC[@]}" ``` certifi is pinned inline for every version; the 3.10 branch is only about pip. conda-forge pip 26.2.2 still requires `python>=3.11`, with no repodata patch, so 3.10 keeps installing pip 26.2.2 from PyPI after the conda step, as before. ## Testing The test runs in `condaforge/miniforge3:24.11.3-0` (the Dockerfiles' Miniforge). For each Dockerfile, it extracts the edited spec block and `conda install` line, runs them, then runs the 3.10 PyPI pip step and the `certifi` line of that version's `ray_base_deps_py<ver>.lock` with `uv pip install --no-deps`. | | 3.10 | 3.11 | 3.12 | 3.13 | 3.14 | |---|---|---|---|---|---| | base-deps | ✅ | ✅ | ✅ | ✅ | ✅ | | base-slim | ✅ | ✅ | ✅ | ✅ | ✅ | Results for every cell: - `certifi` is 2026.10.19, and `conda-meta` has 2026.10.19. - The lock certifi install is a no-op ("Checked 1 package"). - `pip` is 26.2.2. - conda is 26.7.1 on 3.10 (previously 23.9.0 under the cap), 24.11.3 on 3.12 (unchanged), and 26.9.4 on 3.11/3.13/3.14. On 3.10, conda's pip record stays at 24.3.1 because pip still comes from PyPI there, which is unchanged. The four 3.10–3.12 runs that failed when all ten ran in parallel passed when rerun one at a time, so those failures came from the concurrent solves. This changes the base image inputs, so premerge rebuilds every base image from scratch, which also exercises the change on every Python version. Related: the 2.60 cherry-pick of #67256 (#67320) carries the old `certifi<2026` cap; this change should replace it there. ## Additional information Not a duplicate: open PRs touching certifi/conda are only the 2.60 cherry-picks (#67320, #67322, #67346). AI assistance (Claude Code) was used for this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 9a44846) Signed-off-by: Sai Miduthuri <[email protected]>


Cherry-pick of #67298 (master commit 1ac3334) onto
releases/2.60.0.Why
This is a follow-up to #67295 for the eMudhra intermediate CA compromise, covering the Windows and macOS wheel builds. Those builds run pip 25.2, which trusts its own vendored
certifi(2025.7.14, which still includesemSign ECC Root CA - G3).python/setup.pyuses that pip to download the vendored third-party packages without hash checks.#67298 changes four scripts:
python/build-wheel-windows.sh: moves to pip 26.2.2.ci/ray_ci/windows/build_base.sh: moves to uv 0.13.4.python/build-wheel-macos.shandci/build/test-macos-wheels.sh: install pip 26.2.2. Python 3.10 keeps conda's pip 25.2 and upgrades to 26.2.2 from PyPI, because conda-forge's pip 26.2.2 requires Python 3.11 or newer.Cherry-pick details
Applied cleanly with
git cherry-pick -x. The diff is byte-identical to the master commit, index lines included: 4 files, 18 insertions and 4 deletions.No prerequisite commits are missing. The 4 files on this branch were identical to #67298's parent, so after the pick they match master at 1ac3334. This PR is independent of the eMudhra stack (#67320 to #67352), so it's based directly on
releases/2.60.0.Not a duplicate: this branch doesn't contain #67298, and no PR against
releases/2.60.0references it.Testing
pre-commit run --files <the 4 changed files>I didn't run the Windows or macOS wheel builds locally. These scripts run in CI's Windows and macOS wheel builds.
AI assistance was used to prepare this cherry-pick.
🤖 Generated with Claude Code