Skip to content

Respond to eMudhra intermediate CA compromise - #28

Merged
nathanjmcdougall merged 3 commits into
developfrom
fix/emudhra-ca-compromise
Oct 27, 2026
Merged

nathanjmcdougall merged 3 commits into
developfrom
fix/emudhra-ca-compromise

Conversation

@nathanjmcdougall

@nathanjmcdougall nathanjmcdougall commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • .python-version: 3.10.18 -> 3.13.17. This is the development interpreter only.
  • .copier-answers.yml: py_version 3.12.11 -> 3.13.17, so it matches .python-version (a template update would otherwise write the old value back).
  • uv.lock: certifi 2025.10.5 -> 2026.10.23, and the dev-group pip 25.2 -> 26.2.2. Nothing else moved. The only other lock change is the new constraint recorded under [manifest].
  • requirements.txt: certifi 2025.10.5 -> 2026.10.23 (re-exported with the file's own header command).
  • pyproject.toml: new constraint-dependencies = [ "certifi>=2026.10.19" ] under [tool.uv]. The comment on required-version is realigned by one commit because pyproject-fmt aligns comments within a table; the value is unchanged.
  • .github/workflows/ci.yml: the "Setup Python" step now has shell: bash (see below).

Context

Response to the eMudhra intermediate CA compromise (certifi GHSA-6q48-6c7w-9gw2, uv GHSA-hq85-5cpj-mr62). Python 3.12 and earlier have no patched release, so the development interpreter moves to 3.13.17.

Python floor and CI

  • requires-python stays >=3.10, and the classifiers and the CI matrix (3.10 to 3.13) are unchanged.
  • The "Setup Python" step runs uv python pin ${PYTHON_VERSION}. On the Linux and macOS jobs (bash) that pins the matrix version, so those jobs do not read .python-version.
  • On the Windows jobs the default shell is PowerShell, which does not expand ${PYTHON_VERSION}. There uv python pin ran with no argument, which only prints the existing pin, so every Windows job (3.10 to 3.13) used whatever .python-version said. Before this PR that was 3.10.18, so the Windows 3.11, 3.12 and 3.13 jobs were all running 3.10. With the file moved to 3.13.17 they would all have run 3.13.17 and lost the Windows 3.10 coverage (and failed: the pinned uv 0.7.13 cannot download 3.13.17, "No download found for request: cpython-3.13.17-windows-x86_64-none"; the first CI run on this branch showed exactly that).
  • The fix is shell: bash on that step, so each Windows job now runs its own matrix version. The lowest supported Python is still tested on every OS, plus the lowest-direct resolution job on ubuntu, and the Windows 3.11 to 3.13 jobs now test the versions they are named after.
  • The code-analysis job does not run Python.
  • What does change is local development: uv sync and uv run now use 3.13.17 by default, so the 3.10 floor is checked by CI and not by default on developer machines. Running against 3.10 locally still works with uv run --python 3.10 ....
  • release.yml sets up Python 3.13 and runs uv build. uv honours .python-version for the interpreter it builds with, so the package is now built with 3.13.x instead of 3.10.18. The package is pure Python (hatchling), so the wheel is unaffected. The release workflow was not run.

Verified

  • uv lock --upgrade-package certifi --upgrade-package pip (uv 0.7.13) changes only certifi and pip; requirements.txt changes only the certifi entry.
  • uv sync --frozen into a fresh virtual environment on CPython 3.13.17 (test group) installs certifi 2026.10.23.
  • CI=true pytest on 3.13.17 (Windows): 10 passed. No network-drive paths in tests/, src/, tasks/ or .github/.
  • GitHub Actions on the head commit: all 13 jobs of "Run Tests and Checks" (3 operating systems x Python 3.10 to 3.13, plus ubuntu 3.10 lowest-direct) pass, including prek, pyright, zizmor and pytest, and "Analyse Code Quality" and the SonarQube check pass. One job failed once on a transient package download error (jedi) and passed when re-run.

Not verified

  • The release workflow was not run.

Notes

  • uv is deliberately not bumped. [tool.uv] required-version = "==0.7.13" makes any other uv refuse to run in this repository (uv 0.13.5 stops with "Required uv version ==0.7.13 does not match the running version"). Moving to the patched uv (0.13.4 or later) means changing that exact pin together with ci.yml, release.yml, .pre-commit-config.yaml and tasks/scripts/install_backend.sh, which is a separate change for the owners to decide. The lock was therefore refreshed with uv 0.7.13 and keeps its format.
  • .github/copilot-instructions.md still says the project uses Python 3.12; it was left as is.

Move the development environment to patched versions after the eMudhra
intermediate CA compromise (certifi GHSA-6q48-6c7w-9gw2). Python 3.12 and
earlier have no patched release, so developers move to 3.13.17.

* .python-version 3.10.18 -> 3.13.17 and .copier-answers.yml py_version
  3.12.11 -> 3.13.17 (the dev interpreter only). requires-python stays
  >=3.10 and the CI matrix still tests 3.10 to 3.13: every matrix job runs
  `uv python pin <matrix version>`, so the 3.10 jobs do not read this file.
* uv.lock and requirements.txt: certifi 2025.10.5 -> 2026.10.23; the lock
  also moves the dev-group pip 25.2 -> 26.2.2. Relocked with uv 0.7.13,
  the version required by [tool.uv] required-version, so the lock format
  is unchanged.
* pyproject.toml: [tool.uv] constraint-dependencies certifi>=2026.10.19.

uv itself stays at 0.7.13 everywhere: [tool.uv] required-version is
"==0.7.13", so a newer uv refuses to run in this repository.
The "Setup Python" step runs `uv python pin ${PYTHON_VERSION}`, but the
default shell on Windows runners is PowerShell, which does not expand
${PYTHON_VERSION}. `uv python pin` was then run with no argument, which
only prints the existing pin, so every Windows job (3.10 to 3.13) used
whatever .python-version said. That was 3.10.18, so the Windows jobs were
all running 3.10 and the 3.11 to 3.13 entries were not testing those
versions.

With .python-version moved to the patched 3.13.17, the Windows jobs
would have all switched to 3.13.17 (and failed, because the pinned uv
0.7.13 cannot download it). Use bash for the step so the matrix version is
applied on every OS and the Windows 3.10 job still tests the lowest
supported Python.
pyproject-fmt aligns trailing comments within a table, so adding
constraint-dependencies to [tool.uv] moved the column of the comment on
required-version. Whitespace only; the required-version value is unchanged.
@t-t-sonarqube

t-t-sonarqube Bot commented Oct 27, 2026

Copy link
Copy Markdown

@nathanjmcdougall
nathanjmcdougall marked this pull request as ready for review October 27, 2026 02:37
@nathanjmcdougall
nathanjmcdougall merged commit e67f6fc into develop Oct 27, 2026
20 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant