fix: use cibuildwheel's CA bundle in cross venvs #3020
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 278 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.337
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3020"
general
weight: 0.35
ryanking13
:robot: _AI text below_ :robot:
Follow-up to #3017 and #3019. On Android, iOS, and Pyodide, pip runs in a cross venv with a patched
sys.platform. truststore chooses its backend fromplatform.system(), so it uses the OpenSSL backend instead of the macOS or Windows one. This backend reads OpenSSL's default CA file. On macOS hosts, that file is/etc/ssl/cert.pem(for python-build-standalone, and for a python.org framework build that has nocert.pem). That file still has the compromised eMudhra root (emSign ECC Root CA - G3). Apple blocks the bad intermediates through revocation in the Security framework, but this PEM file does not get those blocks.This PR sets two variables to cibuildwheel's certifi bundle, only in the environments that have a patched
sys.platform:SSL_CERT_FILE: truststore then loads this file instead of the host's CA file.PIP_CERTalone is not sufficient here, because with truststore it only adds certs. With pip 26.2.2 and aPIP_CERTthat has one unrelated CA, pip still connects to PyPI.PIP_CERT: for pip without truststore (for example, pip < 24.2 pinned by the user). This path uses requests, which ignoresSSL_CERT_FILE.Scope per platform:
android_env(before-build, build, before-test, test install).build_envhas the realsys.platform, so environment setup, repair, and the test runner do not get the variables.pyodide venv. The build environment is a normal host venv.Values set by the user take priority.
uv also reads
SSL_CERT_FILEin its default mode, so this also covers the uv frontend on Android (uv < 0.13.4 has the bad root in its bundled webpki store).The Android and iOS test projects check in
setup.pythat both variables are set. The Pyodide test checks them inbefore-test. I ran the Pyodide tests locally: they fail without the fix and pass with it. Android and iOS were verified locally in the comments below.