Skip to content

Upgrade vulnerable dependencies (Dependabot backlog, November 2026) - #893

Merged
santicomp2014 merged 3 commits into
mainfrom
deps-vanta-2026-11
Nov 10, 2026
Merged

santicomp2014 merged 3 commits into
mainfrom
deps-vanta-2026-11

Conversation

@santicomp2014

Copy link
Copy Markdown
Contributor

Consolidated upgrade of the packages with open Dependabot alerts in this repo (Vanta SOC2 "packages checked for vulnerabilities" tests). One PR instead of the individual Dependabot PRs.

How

  • Every requirements/*.txt was recompiled with pip-compile --allow-unsafe --upgrade-package <pkg> for each vulnerable package only (no blanket --upgrade), plus the few packages whose pins blocked a fix (pathspec/pytokens for black, zope.event/zope.interface so setuptools can move). All copies of a pin move together. Compiled in a python:3.11.11 linux/amd64 container (the Dockerfile's Python) so platform markers match CI/prod.
  • pip 25.3 -> 26.3 needs pip-tools 7.6.2 (7.5.x cannot import from pip 26), so pip-tools moves with it. pip-tools 7.6 writes # via -r requirements/requirements.in instead of -r requirements.in; comments only.
  • pywb 2.9.1 -> 2.10.1. pywb 2.9.1 pins werkzeug==2.2.3 and gevent==23.9.0.post1 exactly, so neither can move without it. 2.10.x is the smallest release that unpins gevent and moves werkzeug to 3.1.7. It also replaces pkg_resources with importlib and brotlipy with brotlicffi.
  • gevent 23.9.0.post1 -> 24.2.1, greenlet 2.0.2 -> 3.1.0. These are the exact versions the Dockerfile already force-installs on top of the requirements, so production runs the same gevent/greenlet as before. The requirements files now match what is deployed. (The Dockerfile line is now redundant but harmless; I left the Dockerfile untouched.)
  • setuptools. Nothing imports pkg_resources any more (pywb 2.10 dropped it; zope.event 6 / zope.interface 8 use native namespace packages), so setuptools moves to 84.2.1 everywhere. I added setuptools to requirements/requirements.in: no package depends on it now, so without it pip-compile would drop it and the image would keep the base image's setuptools 65.5.1 instead of the 78.1.1 it has today.
  • urllib3 stays at 1.26.15 on purpose, see Deferred.

Versions

Package Old New
pywb 2.9.1 2.10.1
werkzeug 2.2.3 3.1.7
gevent 23.9.0.post1 24.2.1
greenlet 2.0.2 3.1.0
warcio 1.7.4 1.8.2
brotlipy 0.7.0 removed (replaced by brotlicffi 1.2.1.0)
cffi 1.16.0 2.1.1
zope-event 5.0 6.2
zope-interface 6.1 8.7
certifi 2024.7.4 2026.10.23
cryptography 46.0.0 46.0.7
joserfc 0.9.0 1.8.0
idna 3.7 3.20
requests 2.32.4 2.34.2
webob 1.8.8 1.8.11
filelock 3.20.3 4.2.9
setuptools 78.1.1 84.2.1
pip 25.3 26.3
pip-tools 7.5.3 7.6.2
black 25.11.0 26.10.1
pathspec 0.12.1 1.1.1
pytokens 0.3.0 0.4.1
pytest 8.4.2 9.1.1
pylint 4.0.5 4.0.10
pygments 2.17.2, 2.19.2 2.21.0
soupsieve 2.5 4.0.1

Alerts expected to close

199 of 341 open alerts: critical 12/15, high 37/115, medium 122/177, low 28/34.

The 142 that stay open are all either deferred below (89) or attached to a file that no longer exists (53).

Deferred

  • urllib3 1.26.15 in every file that includes requirements.txt (41 high, 18 medium). It is pinned deliberately in requirements.in because urllib3 >= 1.26.16 caused deadlocks under gevent in production (Pin urllib3 to v1.26.15 #716; Dependabot was stopped from bumping it in Stop Dependabot from updating urllib3 #727; upstream gevent and weakref.finalize potentially cause non-deterministic deadlock gevent/gevent#1957, Make custom queue class feature work well with gevent urllib3/urllib3#3289). Every fix needs 1.26.18+ or 2.x, so lifting the pin is a production behaviour change that should be tested on its own under real load. It should not ride along in a bulk dependency PR.
  • cryptography 46.0.7 (18 high, 6 medium). The remaining advisories need 48.0.1, 49.0.0 or 50.0.0. pywb requires pyOpenSSL<26.2, and pyOpenSSL 26.0/26.1 require cryptography<47 / <48, so this is the highest version pywb allows. 46.0.7 clears the advisories that 46.x can fix.
  • werkzeug 3.1.7 (6 medium, GHSA-g6x2-hccm-hh4m, safe_join() and Windows device names, so Windows only). pywb 2.10.x pins werkzeug==3.1.7. Only pywb 2.11.0 unpins it, and 2.11.0 was released four days ago with a large set of rewriting/index changes (frame Sec-Fetch-Dest, Refresh header rewriting, new wombat). That is too much to take for a Windows-only advisory.
  • 53 alerts on a top-level requirements.txt (3 critical, 19 high, 25 medium, 6 low: PyYAML, uWSGI, babel, future, jinja2, pywb 2.4.2, ...). That file was deleted in the 2021 "Requirements reorg" (90bd841) and does not exist on main, but GitHub's dependency graph still lists it as a manifest with its 2020 pins, and it keeps opening new alerts against it. No code change can close these. Someone with admin access needs to dismiss them as "inaccurate", or get the dependency graph to drop the stale manifest.

Test changes

  • tests/unit/viahtml/context_test.py: the environ fixture used SCRIPT_NAME: "script" (no leading slash, which isn't a valid WSGI value) with port 9999. Werkzeug 2.2 silently turned that into http://via/.... Werkzeug 3 builds http://via:9999script/ and raises on the port. The fixture now uses SCRIPT_NAME: "" and port 80, which gives the same http://via/... URLs, so every expected value is unchanged. For valid WSGI environs, werkzeug 2.2.3 and 3.1.7 return identical get_current_url / get_host results; I checked with SCRIPT_NAME "" and "/script". No production code changed.

Testing (local)

  • tox -e lint,checkformatting,tests,coverage,functests (the CI command) on Python 3.11.7: all pass, coverage 100%.
  • docker build of the unchanged Dockerfile: succeeds. Ran the image with supervisord/nginx/uwsgi. /_status returns 200, and proxying example.com, web.hypothes.is and a Wikipedia article returns 200 with wombat and the client embed.js injected. static/pywb/wombat.js is served. In the image: pywb 2.10.1, Werkzeug 3.1.7, gevent 24.2.1, greenlet 3.1.0, urllib3 1.26.15, setuptools 84.2.1.

Before merging

pywb is the core of this service, and 2.9 -> 2.10 brings a newer wombat.js (client-side rewriting). Please smoke test on QA/staging with a few real sites (including iframes and a site that uses workers) before this goes to production.

🤖 Generated with Claude Code

Recompile the requirements files with --upgrade-package for each package
with an open Dependabot alert. pywb moves to 2.10.1 because 2.9.1 pins
werkzeug and gevent exactly. gevent/greenlet move to the versions the
Dockerfile already installs. urllib3 stays pinned at 1.26.15 (gevent
deadlocks, #716).

Fix the context_test environ fixture, which used an invalid SCRIPT_NAME
that werkzeug 3 rejects.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
santicomp2014 and others added 2 commits November 6, 2026 11:45
GitHub's `ubuntu-latest` runners are moving to Ubuntu 26.04, and
actions/setup-python has no 3.11.7 build for 26.04 (the oldest 3.11 build
for it is 3.11.15), so the Backend job fails at "Setup python". 3.11.18 is
the latest 3.11 release and is available on 22.04, 24.04 and 26.04.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Since Python 3.11.9, urllib.parse.parse_qsl() calls memoryview() on
non-str input. The `context` fixture's http_environ was a MagicMock from
create_autospec(), so the redirect tests fail on 3.11.9+ (including the
Dockerfile's 3.11.11 and CI's new 3.11.18) with "memoryview: a bytes-like
object is required, not 'MagicMock'". Use an empty dict, like a request
with no query string.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@santicomp2014
santicomp2014 merged commit bab2cda into main Nov 10, 2026
3 checks passed
@santicomp2014
santicomp2014 deleted the deps-vanta-2026-11 branch November 10, 2026 08:34
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.

2 participants