Repository navigation
Studio and Core: certifi 2026.10.19 and pip 26.2.2 floors (drop the compromised emSign root) - #14887
Merged
Merged
Conversation
…v and Core certifi 2026.10.19 removes the distrusted emSign ECC Root CA - G3. pip before 26.2.2 verifies TLS with its own vendored certifi, so on Python 3.10+ pip is raised too. - install_python_stack: an idempotent trust floor step after the pip bootstrap on every setup, update and repair, torch and no-torch. It installs only the floors the venv does not meet, never downgrades, and warns and continues offline. The pip usability floor is 26.2.2 on 3.10+. - pyproject: certifi>=2026.10.19 in the base dependencies. - Docker: pip, uv and certifi floors on the venv bootstrap lines. - Tests for the pyproject floor and the installer step.
Member
Author
|
@codex review |
1 similar comment
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
danielhanchen
added a commit
that referenced
this pull request
Oct 27, 2026
#14887 floored certifi at 2026.10.19 (and pip at 26.2.2) in the Studio venv and Core, because certifi 2026.7.22 still trusts the distrusted emSign ECC Root CA - G3. The isolated engine environments did not get the same floor. All five locks under `studio/backend/requirements/engines/` still pinned `certifi==2026.7.22`: - vLLM: cu130, cu130 torch 2.13, ROCm 7.2.3 - SGLang: cu130, cu130 torch 2.13 `engine_install.py` syncs those locks with hashes into a separate environment, so a fresh vLLM or SGLang install kept the old CA bundle even with the Studio venv patched. I checked the `cacert.pem` of each wheel: emSign ECC Root CA - G3 is in 2026.7.22 and not in 2026.10.19. For each engine: - the `.in` gets the same `certifi>=2026.10.19` floor as `no-torch-runtime.txt`; - the `.txt` lock pins `certifi==2026.10.19` with the PyPI hashes; - the `.compat.json` `lock_sha256` and certifi size are updated to match the new lock. The PyPI hashes: - wheel `42d35340cc5b9ba78e818ddbff0c5b1c2b779de448a340fd1b989f5fa8670e1b` - sdist `035c1e85572b141bf1c3a3eff0e33a8eb74917522f2559075ff8d2fea780a1ae` Only the certifi entry changes; nothing else is re-resolved. Every `lock_sha256` equals the SHA-256 of its lock file. `tests/studio/install/test_ca_trust_floor.py` now also checks every engine `.in` and `.txt` lock against the floor. With the extended file, main gives 10 failed and this PR gives all passed. `test_managed_engines.py` passes (245 passed together with the floor test). --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
shimmyshimmer
pushed a commit
to shimmyshimmer/unsloth-staging-4
that referenced
this pull request
Oct 27, 2026
…#15509) ## What The vLLM / SGLang engine locks (`studio/backend/requirements/engines/*.txt`) are hash-pinned and still carry `certifi==2026.7.22`, which trusts the revoked eMudhra / emSign roots. Changing the locks would make every installed engine refuse to launch until the user clicks Update in Settings, so the trust is fixed at launch instead. ## Change `managed_engine.py`: a locally launched engine gets `SSL_CERT_FILE` and `REQUESTS_CA_BUNDLE` pointing at Studio's own certifi bundle (Studio's venv is floored at `certifi>=2026.10.19` since unslothai#14887). If the user already set `SSL_CERT_FILE`, `SSL_CERT_DIR` or `REQUESTS_CA_BUNDLE` (corporate CA), nothing is changed. No lock, install flow or UI changes. ## Evidence A venv with the engine locks' exact HTTP stack (certifi 2026.7.22, httpx 0.28.1, requests 2.34.2, huggingface-hub 1.31.0, aiohttp 3.14.3), against the public emSign test host: | client | as launched today | with this change | |---|---|---| | httpx | accepts the revoked chain | rejects | | requests | accepts | rejects | | huggingface_hub session | accepts | rejects | | urllib, aiohttp | reject | reject | huggingface.co still answers normally with the variables set. ## Tests `tests/test_managed_engine_ca_bundle.py`: the bundle is set when none was chosen (and setting it twice changes nothing), a user's own bundle is left alone, a missing bundle file sets nothing, and the local launch applies it. Fails on main (6), passes here. Managed-engine suites: 385 passed; the 3 failures in `test_managed_engines_rocm.py` fail identically on main. Not covered: the WSL guest engine (its own Linux venv, no access to Studio's bundle path).
danielhanchen
added a commit
that referenced
this pull request
Nov 18, 2026
… and pip (#18358) ## Summary On a runner whose own `certifi` or `pip` is below the CA trust floor and has no `uv` on PATH, 59 cases in `tests/studio/install/test_mlx_install.py` fail: ``` studio/install_python_stack.py:8272: in _ensure_trust_floor studio/install_python_stack.py:9653: in pip_install_try FileNotFoundError: [Errno 2] No such file or directory: 'uv' ``` This showed up on the macOS leg of the cross-platform staging run for #16799 (runner certifi 2026.7.22, below the `certifi>=2026.10.19` floor). ## Cause `install_python_stack()` calls `_ensure_trust_floor()` on every setup and update (#14887). That raises certifi, and pip on 3.10+, through `pip_install_try` whenever the running interpreter does not already meet the floor. The `_run_to_extras` helper stubs `pip_install`, `run`, `_bootstrap_uv` and the torch steps, but not this path. So whether these tests spawn a real installer depended on the runner image's certifi and pip versions. On hosts that already meet the floor, nothing runs and the tests pass. The installer behaviour is correct. The test was not hermetic. ## Fix Stub `_trust_floor_specs` to return `[]` in the helper, next to the `_no_torch_pair` stub from #18354. The floor logic keeps its own coverage in `tests/studio/install/test_ca_trust_floor.py`. ## Verification Reproduced by raising the certifi floor above any installed version and running with `uv` removed from PATH: | Tree | floor unmet, no `uv` | normal | |---|---|---| | main | 59 failed, 15 passed | 74 passed | | this branch | 74 passed | 74 passed | `test_ca_trust_floor.py` passes unchanged, and ruff is clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The eMudhra/emSign intermediates were issued with trivially weak private keys (https://discuss.python.org/t/information-for-python-users-regarding-emudhra-emsign-ca-certificate-security-incident/109576, https://emudhra.we-have-a-problem.com/), so anyone can mint a certificate that chains to the emSign ECC Root CA - G3. certifi 2026.10.19 drops that root, and pip 26.2.2 ships it as its vendored bundle (pip always verifies with its own copy, whatever the environment's certifi or
REQUESTS_CA_BUNDLEsay).Studio's torch installs leave certifi to the resolver, and the update path skips a pip it considers usable (major 23 or newer), so an existing install keeps whatever certifi and pip it had. Core (
pip install unsloth) declares no certifi floor at all. truststore, which Studio injects on macOS, Windows and the Linux desktop, adds the OS anchors to certifi's rather than replacing them, so an old certifi stays exploitable there too.Change.
studio/install_python_stack.py: one trust-floor step right after the pip bootstrap, outside every skip path, so it runs on setup, update and repair in torch and no-torch mode. It installs only the floors the venv does not meet (certifi>=2026.10.19, pluspip>=26.2.2on Python 3.10+), through the existing installer helper. A satisfied venv runs nothing; nothing is ever downgraded; offline it warns and carries on. No new step line (the helper prints its label only in verbose mode)._venv_pip_is_usabletreats a pip below 26.2.2 as stale on 3.10+, so the existing bootstrap upgrades it.pyproject.toml:certifi>=2026.10.19in the base dependencies, sopip install -U unsloth(Colab, Kaggle, notebooks) upgrades certifi in place.docker/Dockerfile,docker/Dockerfile.rocm:pip>=26.2.2,uv>=0.13.4,certifi>=2026.10.19floors on the venv bootstrap lines (takes effect on the next image build).no-torch-runtime.txt: comment only; itscertifi==2026.10.19pin is unchanged.Before / after.
requestsagainst the disclosure's test hosts:pip against
--index-url https://dv-g3b-emudhra.we-have-a-problem.com/simple/: pip 24.0 gets past TLS to the page, pip 26.2.2 with its vendored bundle fails withCERTIFICATE_VERIFY_FAILED.The new step on a real venv (Python 3.12, against the live index):
Testing. New
tests/studio/install/test_ca_trust_floor.py(spec selection per installed version and Python, satisfied venv runs nothing, offline warns, a fullinstall_python_stack()run in torch / no-torch and with / without an installer handoff issues the floor install before the first-rinstall, the pyproject and no-torch floors).test_dependency_pass_skips.pyupdated for the 26.2.2 pip floor. 186 passed. Removing the_ensure_trust_floor()call fails the four full-pass cases.Not in this PR: the vLLM/SGLang engine locks still pin
certifi==2026.7.22. Changing a lock changes its digest, and Studio then refuses to launch an installed engine until the user presses Update in Settings, so that bump is left for the next engine refresh.