Skip to content

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

Open
reformedot wants to merge 1 commit into
mainfrom
deps/security-major
Open

reformedot wants to merge 1 commit into
mainfrom
deps/security-major

Conversation

@reformedot

@reformedot reformedot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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

Package From To Alerts fixed How this repo uses it
pillow 12.3.0 13.0.0 43 (5 critical, 24 high, 14 medium) direct: screenshot_evidence.py and two tests; also through browser-use, reportlab, matplotlib
starlette 0.52.1 1.3.1 5 (2 high, 2 medium, 1 low) transitive only: browser-use -> mcp (and sse-starlette)
cryptography 46.0.7 50.0.0 4 (3 high, 1 medium) direct: Fernet in evaluation.py, frameworks/__init__.py, review_rubric_revision.py; also through authlib, google-auth, pyjwt
oauthlib 3.3.1 4.0.1 4 (2 high, 2 medium) transitive only: browser-use -> google-auth-oauthlib -> requests-oauthlib
soupsieve 2.10 4.0 3 (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.

Command Before After
uv sync --frozen --python 3.12 --all-extras --all-groups ok ok
uv run python review_rubric_revision.py exit 0, Validated 18 revised tasks same
uv run python -m unittest discover -s tests Ran 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.py All checks passed! All checks passed!
import of each of the 58 first-party modules outside tests/ 58 ok 58 ok
uvx pyright --pythonpath .venv/bin/python . 61 errors 61 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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="pyproject.toml">

<violation number="1" location="pyproject.toml:18">
P2: This lmnr bump (0.7.56 → 0.7.62) is not one of the five security upgrades in the PR description and is not mentioned there. Laminar is used in the benchmark run and results export workflow, so this change should be called out or split into its own PR. Revert it here unless it is intentionally part of this change.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread pyproject.toml

[project.optional-dependencies]
laminar = ["lmnr==0.7.56"]
laminar = ["lmnr==0.7.62"]

@cubic-dev-ai cubic-dev-ai Bot Nov 30, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This lmnr bump (0.7.56 → 0.7.62) is not one of the five security upgrades in the PR description and is not mentioned there. Laminar is used in the benchmark run and results export workflow, so this change should be called out or split into its own PR. Revert it here unless it is intentionally part of this change.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At pyproject.toml, line 18:

<comment>This lmnr bump (0.7.56 → 0.7.62) is not one of the five security upgrades in the PR description and is not mentioned there. Laminar is used in the benchmark run and results export workflow, so this change should be called out or split into its own PR. Revert it here unless it is intentionally part of this change.</comment>

<file context>
@@ -15,7 +15,7 @@ dependencies = [
 
 [project.optional-dependencies]
-laminar = ["lmnr==0.7.56"]
+laminar = ["lmnr==0.7.62"]
 
 [build-system]
</file context>
Suggested change
laminar = ["lmnr==0.7.62"]
laminar = ["lmnr==0.7.56"]
Fix with cubic

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change. The lmnr 0.7.56 -> 0.7.62 step belongs to #85, where the description explains it: lmnr 0.7.56 pins opentelemetry-api 1.39.1, and 0.7.62 is the first release that accepts the patched 1.45.2. It shows here only because this branch is built on #85.

…tte 1, oauthlib 4, soupsieve 4)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 30, 2026

Copy link
Copy Markdown

@cubic review

@reformedot I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Turn on auto-fix | Re-trigger cubic

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