Repository navigation
chore(deps): allow pillow 13 - #830
svaningelgem wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Enabling e.g. Pillow 13 is very relevant to my projects as it would enable better CVE resolution; @joein could you provide any timescales on when this might be feasible? Thanks in advance |
…sory fixes pillow 12.3.0 carries eight advisories fixed only in 13.0.0, and every fastembed release through 0.9.0 caps pillow<13.0. A [tool.uv] override-dependencies entry lifts the cap until fastembed releases qdrant/fastembed#830. Refs #1824 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sory fixes (#1826) ## Closes / Refs Closes #1824 Refs pvliesdonk/fastmcp-server-template#813, #1823 ## What & why CI's `Dependency Audit` fails on #1823 and will fail on `main` on its next run. `pillow` 12.3.0 carries eight new advisories (CVE-2026-112395, -112397, -112400, -112404, -112895, -112896, -112897, -112899), all fixed only in 13.0.0. `pillow` comes in only through `fastembed`, and every `fastembed` release through 0.9.0 caps `pillow<13.0`, so neither Renovate nor `uv lock --upgrade` can reach the fix. The Docker image installs `--extra all`, so the vulnerable `pillow` ships in it. The change: - `[tool.uv] override-dependencies = ["pillow>=13"]` with `# until: #1824`. An override is needed because a constraint would intersect with `<13.0` and resolve to nothing. Upstream qdrant/fastembed#830 raises the cap with no code change, and fastembed's image tests pass on Pillow 13.0.0. `import fastembed` loads Pillow, and it imports cleanly on 13.0.0. This server only uses text embeddings, which never call Pillow. Nothing else in the lock moves. The `certifi` bump this PR first carried (PYSEC-2026-4320) landed on `main` separately in #1828. ## What this PR deliberately does NOT do Nothing beyond the override. The branch is rebased onto `main` at template v11.4.0, whose audit reads the hashed export with `--require-hashes --disable-pip` (pvliesdonk/fastmcp-server-template#814). pip no longer re-resolves the dependencies, so the override no longer causes `ResolutionImpossible`. v11.4.0 also takes the audit out of `CI Success` (pvliesdonk/fastmcp-server-template#816). After this merges, tick the rebase box on #1823. ## Design None. ## Local review - [x] Ran a local self-review of the cumulative diff before `gh pr create`. - [x] No commit carries `!`. Self-review `96992a30..433defa` (after rebasing onto `main` and re-locking), charters: rules, diff, comments, history (normative: none in this change). Coverage: full. Template conformance: no new drift. `check_pins.py`: OK, two pins with open exit conditions. The lock changes one package version, pillow 12.3.0 → 13.0.0. `main`'s audit commands report `No known vulnerabilities found`, and the full suite passes on pillow 13 (6405 passed; one git-lineage test that also fails on a clean `main` locally was deselected). pillow 13.0.0 has cp311–cp314 manylinux wheels for x86_64 and aarch64, which covers the `python:3.14-slim` image. No findings. **Title type is a call for the account holder.** `fix(deps)` cuts a patch release, so the Docker image ships the patched pillow. Precedent for advisory bumps (#1688, #1747) is `chore(deps)`, but those touched nothing that ships. ## Docs impact - [ ] `README.md`: not affected. - [ ] `docs/` site pages: not affected. - [ ] `docs/design/`: not affected. - [ ] Inline docstrings: not affected. - [x] No spec, so no decisions to port. Gates: ruff, mypy and pre-commit pass. `uv run pytest -q` passes (6394 passed, 2 skipped) except `tests/test_git_merge_lineage.py::TestTheBoundaryHoldsAcrossTheMerge::test_a_predecessor_of_the_old_name_stays_out`. That test fails identically on pristine `main` under local git 2.56.0 (CI runs 2.55.0), and it has nothing to do with this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- _Agent-authored: written by [Claude Code](https://claude.ai/code) under this account's credentials. Analysis and proposal, not a decision by the account holder._ Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…stls-webpki; Python 3.11 or newer → 3.148.7-alpha (#968) pip-audit and cargo-deny, and with them the required `dependencies` check, have been red on main and on every PR since this week's advisories. This takes all of them in one place. pillow 12.3.0 carries CVE-2026-112895, -112400, -112397, -112896, -112897, -112395, -112404 and -112899, and GitHub lists about forty more advisories published from 2026-10-17, two of them critical (among them heap overflows in the FlashPix and JPEG decoders). All are fixed only in pillow 13.0.0; there is no 12.x after 12.3.0. certifi before 2026.10.19 trusts the emSign ECC Root CA - G3, under which eight eMudhra intermediates have compromised keys (PYSEC-2026-4320, GHSA-6q48-6c7w-9gw2). The same distrust reaches Rust as RUSTSEC-2026-0381 (webpki-roots), RUSTSEC-2026-0382 (rustls-webpki) and RUSTSEC-2026-0383 (webpki-root-certs), all CVE-2026-111943. `cargo update -p` moves rustls-webpki 0.103.15 to 0.103.16 and webpki-roots and webpki-root-certs 1.0.7 to 1.0.10, and nothing else in Cargo.lock. In the sidecar locks certifi moves to 2026.10.19 with every other pin held. Its licence was re-entered by hand after reading the wheel: MPL-2.0, with a LICENSE byte-identical to 2026.7.22's. fastembed 0.9.0, the latest release, still declares pillow<13 on every Python although its code runs on 13 (qdrant/fastembed#830 lifts the cap; open and unmerged). So pillow==13.0.0 also goes in a new sidecar/requirements-override.txt, which `just lock-regen` passes to `uv pip compile --override` for the base lock only and stamps in its header. check-requirements-lock verifies the stamp, and that the file only overrides packages requirements.txt pins at the same version. Remove the override line once a fastembed release allows pillow 13. Because the lock is resolved past that cap, pip's own resolver refuses it, so every install of a lock now passes --no-deps beside --require-hashes: the base and optional-component installs in sidecar.rs, pr.yml's locked-dependency test step and release.yml's python-smoke. Every line is still pinned and hash-checked, and the lock is complete because uv resolved it. `just pip-audit` now audits the hashed locks with --disable-pip instead of installing them; on the old locks it still reports all eight pillow advisories. pillow 13 needs Python 3.11, so MIN_PYTHON goes from 3.10 to 3.11 (3.10 reaches end of life this month). The Windows and Linux installers bundle 3.12, and on a Mac PM uses the machine's Python when it is new enough and downloads its own 3.12 otherwise. So the new floor reaches only a venv an older PM built on a 3.10, which is rebuilt once on the next launch, and from-source development on a machine with nothing newer than 3.10. The setup messages now take the version from MIN_PYTHON. The locks lose the 13 package versions that existed only for Python below 3.11, and tzdata's 3.10 marker. pillow 13.0.0's wheel LICENSE is MIT-CMU plus the permissive licences of its bundled natives, byte-identical to 12.3.0's on Linux and macOS. Hardening, on any pillow: the sidecar opens a photo only as a photo format (JPEG, PNG, WebP, and HEIF once pi-heif has registered it), the one its extension names tried first. A TIFF, FlashPix, EPS or any other format renamed .jpg no longer reaches its decoder, while a PNG or WebP saved as .jpg, or a JPEG saved as .png, still reads. Without pi-heif a .heic is tried as the other three, so a real HEIC is refused and a JPEG saved as .heic still reads; any other extension is refused. The fallback that handed rapidocr the raw path when PM's own open failed is gone, since rapidocr opens a path with no such restriction. With OCR on, the pixels are decoded before the engine loads, so a file cut off halfway comes back with no size (its EXIF kept) and its row blames the file, not text recognition; with OCR off nothing decodes the pixels, as before. The photo's file is closed once it has been read. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Raises the pillow cap to
<14.0; image tests pass on Pillow 13.0.0. Closes #829.