Fix Dependabot alerts: re-lock and bump vulnerable pip dependencies - #22
Merged
Conversation
…ip deps
Root cause: uv.lock was stale relative to pyproject.toml. A prior commit
("Relaxed python reqs") removed the requires-python upper bound
(">=3.11,<=3.11.14" -> ">=3.11") in pyproject.toml but never regenerated
uv.lock, which still embedded the old bounded requires-python and
associated platform markers. `uv lock --check` failed because of this
drift. Regenerating the lock against the current pyproject.toml fixes
that inconsistency (no functional dependency changes from this step
alone - resolved versions were unchanged).
On top of that, targeted `uv lock --upgrade-package` bumps resolve the
alerted packages to versions that satisfy each alert's fixed-in version:
- transformers 4.57.6 -> 5.14.1 (fixes #102, #99, #34)
- soupsieve 2.8.1 -> 2.8.4 (fixes #101, #100)
- GitPython 3.1.46 -> 3.1.52 (fixes #54, #53, #51, #43, #42)
- nltk 3.9.2 -> 3.10.0 (fixes #38, #15, #14, #9)
- Pygments 2.19.2 -> 2.20.0 (fixes #21)
All of these are transitive dependencies only (not listed directly in
pyproject.toml), pulled in via datasets/inspect-ai/rich/wandb/textarena
etc. No application code imports nltk, GitPython, or Pygments directly.
huggingface_hub was transitively bumped 0.36.0 -> 1.16.1 as part of the
transformers resolution; verified the app's direct huggingface_hub
imports (server/hf_upload.py, workloads/mcp_support/*.py: HfApi,
upload_file, upload_folder, HfHubHTTPError) still import cleanly against
1.16.1.
Left unresolved (no fix available upstream, fixed_in is null on the
advisory - cannot be resolved by any dependency bump):
- vllm (#96, #95, #94, #93, #92)
- torch (#64)
- nltk - some CVEs affect all released versions (#89, #50, #16, #13)
- diskcache (#8)
vllm/torch were intentionally NOT bumped beyond their current pinned
versions in this PR: the app imports vllm's internal, version-specific
APIs extensively, and since no security fix exists yet for the open
alerts anyway, an unforced version bump would add install-compatibility
risk without closing any alert.
Testing performed:
- `uv lock --check` passes.
- Verified resolved lockfile versions against every alert's fixed_in
(version-tuple comparison): all 15 alerts with a real fix now satisfied.
- Full `uv sync` isn't possible on this machine (macOS, no GPU) because
vllm is an unconditional core dependency that pulls Linux/NVIDIA-only
wheels (e.g. nvidia-cudnn-frontend) - reproduced the identical failure
on an unmodified clone of main, confirming it's pre-existing and
unrelated to this change.
- Installed the five bumped packages (transformers, soupsieve, nltk,
GitPython, Pygments) plus huggingface_hub/datasets together in an
isolated venv; dependency resolution succeeded with no conflicts and
all imports succeeded, including the app's actual huggingface_hub
import sites.
- No test suite or lint config exists in this repo beyond
`[tool.ruff] line-length = 100`, so there was nothing else to run.
GPU-based end-to-end testing of the vllm/torch/transformers stack was
not possible in this environment and should happen before merge.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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 15 of 26 open Dependabot alerts by re-generating
uv.lockand bumping the affected transitive dependencies to versions that satisfy each advisory's patched-version requirement. The remaining 11 alerts have no upstream fix available (fixed_inis null) and are left open with reasons documented below.Root cause found and fixed first:
uv.lockwas stale relative topyproject.toml. Commit "Relaxed python reqs" changedrequires-pythonfrom>=3.11,<=3.11.14to>=3.11inpyproject.tomlbut never regenerated the lockfile, souv.lockstill carried the old boundedrequires-pythonand its associated platform markers. This madeuv lock --checkfail outright, independent of any security bump. Regenerating the lock against the currentpyproject.tomlfixed that drift (no version changes from this step alone).On top of the corrected lock, targeted
uv lock --upgrade-package <name>bumps were applied:All five are transitive dependencies (not listed directly in
pyproject.toml) pulled in viadatasets,inspect-ai,rich,wandb,textarena, etc. No application code importsnltk,GitPython, orPygmentsdirectly, so the blast radius of these bumps is limited to whatever depends on them internally.huggingface_hubwas transitively bumped0.36.0 -> 1.16.1as a side effect of thetransformersresolution (a major version jump). I checked this specifically since it's a bigger jump: the app's directhuggingface_hubimports (server/hf_upload.py:HfApi,upload_file,upload_folder,HfHubHTTPError;workloads/mcp_support/*.py:HfApi) all still import cleanly against 1.16.1 in an isolated venv test.Only
uv.lockwas changed.pyproject.tomlwas not touched (itsrequires-pythonwas already correct; only the lock needed regenerating).Left unresolved (no fix available or bump not warranted)
fixed_in: nullon all five advisories, i.e. no patched version exists upstream. Also, this app imports vllm's internal, version-specific APIs extensively, so I deliberately did not force an unrelated version bump here — it would add real install/compat risk without closing any alert.fixed_in: null, no fix available.fixed_in: null); nltk was bumped to the latest release (3.10.0) anyway as part of fixing the other nltk alerts, but that doesn't close these.fixed_in: null, current version (5.6.3) is already the latest release.Testing performed
uv lock --checkpasses against the regenerated lock.fixed_inagainst the resolved lockfile version (proper version-tuple comparison, not string comparison): all 15 alerts with a real advertised fix are now satisfied; 0 unresolved among those with a fix.uv syncis not possible on macOS without a GPU in this environment:vllmis an unconditional core dependency (pyproject.tomldependencies, not an optional extra) and pulls Linux/NVIDIA-only wheels (e.g.nvidia-cudnn-frontend) that have no macOS build. I reproduced the exact same failure on a fresh, unmodified clone ofmainto confirm this is pre-existing and unrelated to this change, not something introduced here.huggingface_hub/datasetsin an isolated venv (bypassing the vllm/torch/GPU blocker) to sanity-check the actual dependency graph resolves without conflicts and everything imports, including the app's realhuggingface_hubimport sites.[tool.ruff] line-length = 100(no CI workflows either), so there was nothing further to run.Risk to flag before merging
huggingface_hub0.36 -> 1.16 major bump is the biggest change in this PR by version-distance. I verified import-level compatibility for the app's direct usages, but did not (and could not, without a GPU) run the actual model-loading/upload code paths end-to-end.