fix(deps): major security updates (Pillow 13, cryptography 50, starlette 1, oauthlib 4, soupsieve 4)

RE
3d ago
+149-145

Major update: do not merge without the owner's decision.

This pull request builds on #85 (patch and minor updates) and adds the five packages whose security fix exists only in a new major version. Together with #85 it fixes all 115 open Dependabot alerts; this part fixes 59 of them (5 critical, 33 high, 20 medium, 1 low). Merge #85 first; the diff of this pull request then shrinks to the changes below.

What changed

PackageFromToAlerts fixedHow this repo uses it
pillow12.3.013.0.043 (5 critical, 24 high, 14 medium)direct: screenshot_evidence.py and two tests; also through browser-use, reportlab, matplotlib
starlette0.52.11.3.15 (2 high, 2 medium, 1 low)transitive only: browser-use -> mcp (and sse-starlette)
cryptography46.0.750.0.04 (3 high, 1 medium)direct: Fernet in evaluation.py, frameworks/__init__.py, review_rubric_revision.py; also through authlib, google-auth, pyjwt
oauthlib3.3.14.0.14 (2 high, 2 medium)transitive only: browser-use -> google-auth-oauthlib -> requests-oauthlib
soupsieve2.104.03 (2 high, 1 medium)transitive only: browser-use -> markdownify -> beautifulsoup4

pyproject.toml: requires-python moves from >=3.11 to >=3.11.5. soupsieve 3.0.2 and 4.0 (the only patched versions) require Python 3.11.5 or newer, so the lock does not resolve without this change. CI and the workflows use Python 3.12.

Breaking changes of each major update

  • pillow 13.0.0: drops Python 3.10; saving mode I images as PNG no longer clips values; Image.fromarray(mode=...) no longer changes data types; Image.Image.get_child_images() moved to ImageFile.ImageFile; Image._show, ImageCms.ImageCmsProfile.product_name/.product_info and ExifTags.IFD.Makernote are removed. First-party code calls Image.open, Image.new, Image.MIME, Image.Resampling.LANCZOS, resize, save and Image.DecompressionBombError only; none of the removed items.
  • starlette 1.0 to 1.3.1: 1.0 removes all features that were deprecated in the 0.x series. No first-party code imports starlette. mcp 1.30.0 declares starlette>=0.27 with no upper bound.
  • cryptography 47 to 50: removes OpenSSL 1.1.x, LibreSSL < 4.1, binary elliptic curves (SECT*), Python 3.8, x86_64 macOS wheels and 32-bit Windows; stricter loading of malformed keys, certificates and CRLs. First-party code uses cryptography.fernet.Fernet only. Note for macOS on Intel: cryptography 49 and newer ship no x86_64 macOS wheel, so that platform needs a Rust toolchain to build it.
  • oauthlib 4.0.0, 4.0.1: server side changes (JSONP support removed from the token revocation endpoint, stricter DeviceCodeGrant validation). This repo reaches oauthlib only as an OAuth client through google-auth-oauthlib.
  • soupsieve 3.0 and 4.0: drops Python 3.10 (and needs 3.11.5); :has() is stricter by default; custom selectors must be given in order; contents of template and iframe are no longer matched as part of the document. No first-party code calls soupsieve or select(). markdownify does not use CSS selectors; browser-use 0.11.5 only hands BeautifulSoup to the namespace of its code-use agent.

Proof

Each command ran on main (before) and on this branch (after), on Linux with Python 3.12.

CommandBeforeAfter
uv sync --frozen --python 3.12 --all-extras --all-groupsokok
uv run python review_rubric_revision.pyexit 0, Validated 18 revised taskssame
uv run python -m unittest discover -s testsRan 78 tests, OK (skipped=3)Ran 78 tests, 1 failure locally (see below); the test check of this pull request runs the same suite and passes
uv run ruff check bcode_runner.py bcode_eval.py bcode_results.py tests/test_bcode_runner.py tests/test_bcode_binary.pyAll checks passed!All checks passed!
import of each of the 58 first-party modules outside tests/58 ok58 ok
uvx pyright --pythonpath .venv/bin/python .61 errors61 errors, the same list

The local failure is test_runner_grades_partial_execution_and_retains_judge_artifacts (AssertionError: None != 0.7). This test and test_timeout_preserves_partial_tool_and_file_evidence give a fake executor a 0.4 second task timeout. The test machine was shared and under heavy load (load average 8 to 15 on 2 cores) during these runs, and under that load both tests also fail on main. Run alone three times each under that load, at least one of the two failed in 3 of 3 runs on main and in 1 of 3 runs on this branch.

The 3 skipped tests are skipped before and after: they need a Chrome binary (BCODE_TEST_CHROME) or a released binary (BCODE_TEST_BIN), which the test machine did not have.

An offline script exercised the paths that reach the updated packages on this branch: a Fernet encrypt and decrypt round trip; markdownify and a BeautifulSoup select() (soupsieve 4.0); import of google_auth_oauthlib.flow and requests_oauthlib (oauthlib 4.0.1); import of the mcp server and client transports and building FastMCP(...).sse_app() and .streamable_http_app() (starlette 1.3.1); import of browser_use, browser_use.mcp.server and browser_use.mcp.client; a reportlab ImageReader on a Pillow 13 image. All steps passed.

Not tested: a real benchmark run (it needs API keys and a browser provider).

Dependabot pull requests that this replaces

#45 (cryptography), #63 (pillow), #73 (oauthlib), #83 (starlette).

šŸ¤– Generated with Claude Code