Skip to content

Resolve open Dependabot security alerts (Pillow 13, drop Python 3.10) - #428

Merged
lstein merged 4 commits into
masterfrom
lstein/fix/dependabot-security-alerts
Oct 26, 2026
Merged

lstein merged 4 commits into
masterfrom
lstein/fix/dependabot-security-alerts

Conversation

@lstein

@lstein lstein commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

This clears all 82 open Dependabot alerts (pip and npm), including every critical and high one.

  • Pillow 12.2.0 → 13.0.0: about 40 decoder memory-safety and DoS advisories, 5 of them critical (FPX/JPEG heap overflows, TIFF write overflow, Ghostscript argument injection, and others), many of them reachable from Image.open(). Pillow 13 requires Python ≥3.11, so Python 3.10 support is dropped. 3.10 reached end of life this month; the launcher and Docker already use 3.11 or later. CI now tests 3.11 and 3.14 and lints on 3.11, and the docs, READMEs and the deprecated installers' version checks say 3.11.
  • starlette 1.10.0 (the floor is now >=1.3.1 for the urlencoded form limits fix) and fastapi 0.162.
  • urllib3 2.8.0, certifi 2026.10.23, cryptography 50.0.2, anyio 4.14.2, fsspec 2026.9.0, filelock 4.2.4, werkzeug 3.1.9, torch 2.14.1.
  • setuptools 66.1.1 → 84.2.1: the setuptools<67 runtime pin is removed.
    • clip-anytorch still does from pkg_resources import packaging, and setuptools 81+ no longer ships pkg_resources. The new encoders.import_openai_clip() puts in a temporary stand-in while clip imports, under a lock because indexing and search can build encoders at the same time.
    • The Dockerfiles and the deprecated installers download the CLIP weights through this helper.
  • Docs toolchain: mkdocs 1.6.1, mkdocs-material 9.8.0, pymdown-extensions 12.3. The fixed mkdocs-material needs mkdocs 1.6, so the mkdocs<1.6 live-reload workaround is lifted; I checked that mkdocs serve rebuilds and reloads when a file changes.
  • npm: npm audit fix for the dev-only Jest/ESLint tree; npm audit now reports 0 vulnerabilities.

Test plan

  • pytest tests: 1345 passed (the reviewer also ran it with -W error::DeprecationWarning: 1347 passed)
  • npm test: 1019 passed; ruff, eslint and prettier are clean
  • A script checked each open pip alert's fixed version against uv.lock: all pass
  • Real server on a real album: page load, image serving, Range → 206, text search
  • New tests for import_openai_clip(); the reviewer's two-thread race repro passes after the lock was added
  • Docker image build (not run locally)

🤖 Generated with Claude Code

lstein and others added 4 commits October 26, 2026 10:38
Upgrade every package with an open critical/high (and lower) alert:

- Pillow 12.2.0 -> 13.0.0 (~40 decoder memory-safety/DoS advisories,
  5 critical). Pillow 13 dropped Python 3.10, so requires-python is now
  >=3.11 and CI tests/lints on 3.11 instead of 3.10.
- starlette 1.2.1 -> 1.10.0 (floor >=1.3.1: urlencoded form limits),
  fastapi 0.136.3 -> 0.162.0
- urllib3 2.8.0, certifi 2026.10.23, cryptography 50.0.2, anyio 4.14.2,
  fsspec 2026.9.0, filelock 4.2.4, werkzeug 3.1.9, torch 2.14.1
- setuptools 66.1.1 -> 84.2.1. The `setuptools<67` runtime pin is gone;
  clip-anytorch's `from pkg_resources import packaging` is satisfied by a
  temporary stand-in in the new encoders.import_openai_clip(), since
  setuptools 81+ no longer ships pkg_resources. The Dockerfiles and the
  legacy Linux/mac installer pre-download CLIP weights through it.
- docs toolchain: mkdocs 1.6.1, mkdocs-material 9.8.0, pymdown-extensions
  12.3. The mkdocs<1.6 live-reload workaround is no longer needed.
- npm audit fix for the dev-only Jest/ESLint tree (js-yaml, brace-expansion,
  minimatch, flatted, ws, form-data, browserslist, ...).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…over 3.10 checks

Fixes from adversarial review: an unlocked sys.modules check could return a
half-imported clip module to a second thread (indexing and search build
encoders concurrently). Also moves the Windows installer off a bare
'import clip' and raises the deprecated installers' floor to 3.11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orch'

Only a missing clip module means the package isn't installed. An
ImportError from inside clip's imports was relabeled too, which hid the
real cause of the intermittent macOS 3.11 CI failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ging

macOS 3.11 CI failed with "cannot import name 'packaging' from
'pkg_resources' (unknown location)". Upgrading the runner's bundled
setuptools 65 leaves an empty pkg_resources/ directory, which imports as a
namespace package, so the helper saw pkg_resources already in sys.modules
and skipped the stand-in. Replace any pkg_resources without packaging for
the duration of the clip import, then restore it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lstein
lstein merged commit e38e7b4 into master Oct 26, 2026
10 checks passed
@lstein
lstein deleted the lstein/fix/dependabot-security-alerts branch October 26, 2026 19:26
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