HF-PT-2.9: patch safety, pip check, and ECR scan failures#5837
Closed
Eren-Jeager123 wants to merge 7 commits intoaws:masterfrom
Closed
HF-PT-2.9: patch safety, pip check, and ECR scan failures#5837Eren-Jeager123 wants to merge 7 commits intoaws:masterfrom
Eren-Jeager123 wants to merge 7 commits intoaws:masterfrom
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.
Purpose
Patch several failures, including version checks and CVEs.
Justifications for allowlists
1. gradio (safety ID 72086) — spec >=0 Justified. The advisory itself says "the supplier disputes this because the report is about a user attacking himself." Every version of gradio is flagged (>=0), meaning there is literally no version you can upgrade to. No fix exists.
2. onnx (safety ID 89485) — spec <=1.20.1 The latest onnx on PyPI is 1.20.1. The vulnerability spec covers all versions up to and including 1.20.1. There is no patched version available. Allowlist is justified.
3. onnx CVE-2026-28500 (ECR scan) Same package, same situation. PyPI confirms 1.20.1 is the latest release. The fixed_in field in the vulnerability data is empty ([]). No fix exists.
4. sagemaker (safety ID 88445) — spec <3.4.0 The latest sagemaker on PyPI is 3.7.0, and sagemaker 3.4.0+ does exist. However, sagemaker 3.x is a complete rewrite — it drops Estimator, Model, Predictor and all their subclasses. This is a training container that relies on the sagemaker 2.x API. Upgrading to 3.x would break the container's core functionality. Allowlist is justified because the fix requires a breaking major version change that's incompatible with this image.
5. sagemaker/protobuf pip check exception This is a direct consequence of (4). We need protobuf>=6.33.5 for CVE-2026-0994, but sagemaker 2.257.0 caps protobuf at <6.32. Since we can't upgrade sagemaker to 3.x (see above), and we can't drop the protobuf CVE fix, the pip check conflict is unavoidable. The exception is justified.
Toggle if you are merging into master Branch
By default, docker image builds and tests are disabled. Two ways to run builds and tests:
How to use the helper utility for updating dlc_developer_config.toml
Assuming your remote is called
origin(you can find out more withgit remote -v)...python src/prepare_dlc_dev_environment.py -b </path/to/buildspec.yml> -cp originpython src/prepare_dlc_dev_environment.py -b </path/to/buildspec.yml> -t sanity_tests -cp originpython src/prepare_dlc_dev_environment.py -rcp originNOTE: If you are creating a PR for a new framework version, please ensure success of the local, standard, rc, and efa sagemaker tests by updating the dlc_developer_config.toml file:
sagemaker_remote_tests = truesagemaker_efa_tests = truesagemaker_rc_tests = truesagemaker_local_tests = trueHow to use PR description
Use the code block below to uncomment commands and run the PR CodeBuild jobs. There are two commands available:# /buildspec <buildspec_path># /buildspec pytorch/training/buildspec.yml# /tests <test_list># /tests sanity security ec2sanity, security, ec2, ecs, eks, sagemaker, sagemaker-local.Toggle if you are merging into main Branch
PR Checklist
pre-commit run --all-fileslocally before creating this PR. (Read DEVELOPMENT.md for details).