chore(deps): fix 2 critical Dependabot alerts#7
Open
shenxingy wants to merge 1 commit into
Open
Conversation
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.
Critical Dependabot alerts remediated
torch.loadRCE)Companion pin:
torchvision0.14.1 → 0.21.0 (the release paired with torch 2.6.0; it hard-pinstorch==2.6.0).Dockerfile change (required for the bump to be deployable)
torch 2.6.0 requires Python >= 3.9, but the image installed Python 3.8. Switched to python3.10 (newest version compatible with the existing
numpy==1.22.0pin), addedpython3.10-distutils, fixed the pre-existingupdate-alternativestypo (/usr/bin/pytho3) so/usr/bin/python3actually points at 3.10, and switched installs topython3 -m pipso pip targets the right interpreter. Base CUDA image untouched — PyPI torch wheels bundle their own CUDA runtime (2.6.0 defaults to cu124; host driver must support CUDA 12.4, i.e. driver >= 550).Incidentally cleared (same package bumps)
Still open, out of scope (critical-only pass)
Behavior note for reviewers
torch 2.6 flips the
torch.loaddefault toweights_only=True— this IS the CVE fix. Call sites (main_infer.py:17,merge.py:11-12,toolkit/chelper.py:61,71) loadstate_dict-style checkpoints, which is the supported pattern; if any existing checkpoint pickle contains non-tensor objects, loading will raise — re-save the checkpoint or passweights_only=Falsefor trusted local files.main.shusestorch.distributed.launch --use_env, which is deprecated but still functional in 2.6.Verification
uv pip compile requirements.txt --python-version 3.10resolves cleanly: torch==2.6.0, torchvision==0.21.0, pillow==10.2.0, numpy==1.22.0 all coexist.