Skip to content

Fix Dependabot alerts: re-lock and bump vulnerable pip dependencies - #22

Merged
ishubhamvashist merged 1 commit into
mainfrom
fix/dependabot-alerts
Jul 16, 2026
Merged

Fix Dependabot alerts: re-lock and bump vulnerable pip dependencies#22
ishubhamvashist merged 1 commit into
mainfrom
fix/dependabot-alerts

Conversation

@ishubhamvashist

Copy link
Copy Markdown
Contributor

Summary

Resolves 15 of 26 open Dependabot alerts by re-generating uv.lock and 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_in is null) and are left open with reasons documented below.

Root cause found and fixed first: uv.lock was stale relative to pyproject.toml. Commit "Relaxed python reqs" changed requires-python from >=3.11,<=3.11.14 to >=3.11 in pyproject.toml but never regenerated the lockfile, so uv.lock still carried the old bounded requires-python and its associated platform markers. This made uv lock --check fail outright, independent of any security bump. Regenerating the lock against the current pyproject.toml fixed that drift (no version changes from this step alone).

On top of the corrected lock, targeted uv lock --upgrade-package <name> bumps were applied:

Package Before After Alerts fixed
transformers 4.57.6 5.14.1 #102, #99, #34
soupsieve 2.8.1 2.8.4 #101, #100
GitPython 3.1.46 3.1.52 #54, #53, #51, #43, #42
nltk 3.9.2 3.10.0 #38, #15, #14, #9
Pygments 2.19.2 2.20.0 #21

All five are transitive dependencies (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, so the blast radius of these bumps is limited to whatever depends on them internally.

huggingface_hub was transitively bumped 0.36.0 -> 1.16.1 as a side effect of the transformers resolution (a major version jump). I checked this specifically since it's a bigger jump: the app's direct huggingface_hub imports (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.lock was changed. pyproject.toml was not touched (its requires-python was already correct; only the lock needed regenerating).

Left unresolved (no fix available or bump not warranted)

Testing performed

  • uv lock --check passes against the regenerated lock.
  • Wrote a small script comparing every alert's fixed_in against 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.
  • Full uv sync is not possible on macOS without a GPU in this environment: vllm is an unconditional core dependency (pyproject.toml dependencies, 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 of main to confirm this is pre-existing and unrelated to this change, not something introduced here.
  • Installed the five bumped packages together with huggingface_hub/datasets in 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 real huggingface_hub import sites.
  • This repo has no test suite and no lint config beyond [tool.ruff] line-length = 100 (no CI workflows either), so there was nothing further to run.

Risk to flag before merging

  • The huggingface_hub 0.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.
  • GPU-based testing of the vllm/torch/transformers stack was not possible in this environment and should happen before merge, given this app is a synthetic-data-generation client built directly on vllm/transformers internals.

…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>
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