Repository navigation
Conversation
Resolves 4 open Dependabot alerts on soupsieve (a runtime transitive dependency of beautifulsoup4, used by the scraper's 21 .select()/ .select_one() calls against attacker-controlled HTML): - CVE-2026-126190 (high): polynomial DoS in the descendant combinator - CVE-2026-126191 (high): exponential ReDoS in selector compilation - CVE-2026-126193 (medium): uncontrolled CSS parser recursion - CVE-2026-126192 (medium): quadratic :has() sibling matching soupsieve 3.x/4.x require Python >= 3.11.5, so the previous floor of >=3.11 made uv resolve a split lock (2.10 for 3.11.0-3.11.4) that would leave 3 of the 4 alerts open. Narrow requires-python to >=3.11.5 to get a single soupsieve 4.1 entry; this only excludes 3.11.0-3.11.4 (2022-2023 patches that have their own known CVEs). CI's '3.11' installs the latest patch (3.11.17) and Docker already ships 3.14. Also drops tomli, a <3.11 backport no longer reachable. Validated with ruff, pyright (0 errors) and pytest: 2126 passed; the 3 failures are the pre-existing network-fixture ones that also fail on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves the 4 open Dependabot alerts on
soupsieve(#26–#29: 2 high, 2 moderate) — and unlike the previous dev-only bumps, these are real runtime vulnerabilities in the product.\9-run):has()general sibling matching on untrusted HTMLWhy this one matters
soupsieveis a runtime transitive dependency ofbeautifulsoup4==4.15.0, and the scraper runs.select()/.select_one()in 21 places (extractor.py,helpers.py,static.py,dynamic.py,scrape_service.py) against attacker-controlled HTML — that is the tool's core function. A malicious target page could hang or CPU-exhaust the scanner (DoS), which is exactly what these advisories describe.Root cause of the floor change
Fixing all four alerts requires
soupsieve >= 4.0.0(latest:4.1). Everysoupsieverelease from 3.0 onward requires Python >= 3.11.5, while the project hadrequires-python = ">=3.11"(3.11.0+).The dry run showed the consequence — the same split-lock pattern seen earlier with
filelock/3.10:2.10(selected for 3.11.0–3.11.4) is still vulnerable to 3 of the 4 advisories, so Dependabot would have kept them open. Narrowing the floor to>=3.11.5yields a singlesoupsieve 4.1entry and closes all 4.Scope of the narrowing: it only excludes Python 3.11.0–3.11.4 (2022–2023 patches that have their own known CVEs, e.g. CVE-2023-40217). CI's
3.11matrix entry installs the latest patch (3.11.17) and Docker already shipspython:3.14-slim.Changes
pyproject.toml:requires-python = ">=3.11.5"uv.lock:soupsieve2.9.2 -> 4.1 (single entry, no split); dropstomli(a<3.11backport no longer reachable)docs/INSTALLATION.md,docs/DEVELOPMENT.md,AGENTS.mdValidation
uv sync --extra api --extra dev— clean,soupsieve==4.1installeduv run ruff check .— all checks passuv run pyright— 0 errors, 0 warningsuv run pytest -m "not slow and not network"— 2126 passed, 3 failed; the 3 are the pre-existing network-fixture failures that reproduce identically onmain. The passing suite includes the scraping tests that exercise BeautifulSoup CSS selectors againstsoupsieve 4.1.Notes
fix(deps)(security fix + patch-level floor) → release-please will cut a patch release.ModelRouterstill has its own separate open alert (virtualenvfix: update severity indicators in attack results for better clarity #19, high) — tracked separately, not part of this PR.