Repository navigation
ci: stop trusting the eMudhra (emSign) certificate authorities - #253
Merged
Merged
Conversation
The emSign certificate authorities' private keys can be recovered, so the tools that ship their own certificate list need updates (pip 26.2.2, uv 0.13.4, certifi 2026.10.19). - Publish with pypa/gh-action-pypi-publish 1.14.3 (GHSA-5xjx-3w67-w9x9), whose certifi no longer includes the emSign root. - Pin uv 0.13.5 in the release, docs, and examples workflows and in the starter and demo check.yml files. The toolchain validator now reads the pin from pyodide-build.json and also covers the example workflows. - Install pip 26.2.2 from a hash-checked URL before the citry-ui wheel tests and the VS Code language-server installs download from PyPI. - Raise certifi to 2026.10.19 in the root, benchmark, and agent-usage locks, and upgrade pip first in the agent-usage image. - Add a blog post for users about the incident. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Address review findings on the emSign change:
- pip 26.2.2 also trusts the operating system's list, which on Debian 12
and older runner images still holds emSign ECC Root CA - G3. After the
hash-checked upgrade, CI and the agent-usage image set
PIP_USE_DEPRECATED=legacy-certs so pip uses only its bundled certifi.
- The toolchain validator parses every workflow and the example
check.yml files, resolves ${{ env.* }} references, requires the reviewed
uv in publish, docs, and examples workflows, and checks every
gh-action-pypi-publish use. A new test covers the drift cases.
- docs/codebase.md states the minimum uv.
- The blog post names the one affected root, the operating-system list,
build-backend downloads, Node.js-based downloads, and corrects the uv
advice.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Move the pnpm pin check back inside its per-workflow loop; the previous commit left it checking only the last file. - The docs deploy workflow now pins the reviewed uv, and the pin checker matches action names without regard to case, reads step env, and reads .yaml files and every example workflow. - The agent-usage image sets PIP_USE_DEPRECATED=legacy-certs only for its install, so a new virtual environment in the image keeps working. - Blog post: names the affected root, the pip setting's side effects, the Ubuntu 24.04 fix, and the Node.js-based uploads. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#244 raised citry's pin to citry-core==1.9.0 but left the distribution verifier expecting 1.8.0, so every citry wheel check failed with "unexpected runtime dependencies". The verifier now reads citry-core's own [project] version, and a test checks that citry pins that release. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…asses The Windows test job failed 15 tests: - The toolchain and published-README validators printed paths with backslashes on Windows. They now name files with forward slashes on every OS, as the repository does, so messages read the same everywhere. - test_json_ranges_of_every_rule_family_count_from_zero stripped the temporary directory with a hard-coded "/"; it now uses os.sep. Co-Authored-By: Claude Opus 5.5 <[email protected]>
JuroOravec
added a commit
that referenced
this pull request
Oct 22, 2026
#253 landed as a squash commit whose tree equals f336ada, which this branch already contains, so this branch's tree is kept unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 22, 2026
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.
On 2026-10-20 the Python security team announced that the private keys of several eMudhra (emSign) certificate authorities can be recovered. They all chain to one root, "emSign ECC Root CA - G3". Any tool that still trusts that root can be fooled into talking to a fake pypi.org. This PR updates every place where Citry's builds use a Python tool to download or upload packages, and adds a blog post for users.
Citry's packages are not affected: none of them depends on certifi or makes HTTPS calls while an app runs. So there's no package release or changelog entry.
What changes
pypa/gh-action-pypi-publishgoes to v1.14.3 (7245906f), which fixes GHSA-5xjx-3w67-w9x9. The old pin bundled a certifi that trusted emSign for Trusted Publishing and the upload.latest), examples tests, and the starter and democheck.ymlfiles. 0.13.4 dropped the root; 0.13.5 also rejects chains that contain the compromised intermediate keys.pyodide-build.jsonstays the single source for the version.#sha256=checksum. pip checks that checksum itself, and I confirmed it rejects a wrong hash. pip 26.2.2 also trusts the operating system's certificate list, and on Debian 12 and older runner images that list still has the root. So after the upgrade these steps setPIP_USE_DEPRECATED=legacy-certs, and pip uses only its own certifi. Older pip rejects that value, so the one step that makes a fresh, offline venv unsets it.scripts/validators/toolchain.pynow reads every workflow and example workflow as YAML, works out which uv version each setup-uv step actually gets (following${{ env.* }}at workflow, job, and step level), and requires the exact pin in the publish, docs, and examples workflows. It also checks everygh-action-pypi-publishuse. Before, the uv env values, the vscode publisher, single pins among several, and the pygments publisher went unchecked. New test:packages/py/citry/tests/test_toolchain_validator.py.docs/codebase.mdgives the minimum uv version.docs_site/content/blog/2026-10-22-emsign-certificate-incident.md: what happened, what users should update, and what we changed.What this PR leaves open (follow-ups)
Tracked in #255.
vsceandovsxuploads that send the Marketplace and Open VSX tokens. These get fixed when GitHub's runners ship a Node.js release without the root. The blog post says so.uv builddownloads setuptools/maturin without hashes. Pinning them would use--build-constraintwith hashes.main. The first real test of uv 0.13.5 there will be the next qualification run. Run oneoperation=qualifydispatch soon after merging.Checks
scripts/check.py --profile fast: passed (all 20 phases).scripts/check.py --profile fullon016ef4646: passed (all 21 phases, with coverage).python -m docs_site build-check: 0 errors, 0 warnings.mypy --platform linux scripts/validators/toolchain.py: clean.latest, an omitted version, an old or recased upload action, and an old pnpm action all fail as expected.validateand its 195 tests pass with the relocked certifi.Two independent review agents (technical and prose) reviewed the change, and I folded their findings in.
🤖 Generated with Claude Code