fix(model-engine): remediate Trivy vulnerability findings#818
Open
scale-ballen wants to merge 4 commits intomainfrom
Open
fix(model-engine): remediate Trivy vulnerability findings#818scale-ballen wants to merge 4 commits intomainfrom
scale-ballen wants to merge 4 commits intomainfrom
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
lilyz-ai
approved these changes
May 1, 2026
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
Verification
Trivy Result
Greptile Summary
This PR remediates Trivy vulnerability findings in the model-engine image by bumping a range of Python dependencies to patched versions, upgrading kubectl from v1.35.3 to v1.35.4 (fixing the
moby/spdystreamtransitive CVE), and removing pip from the runtime venv post-install so Trivy no longer reports pip CVEs at scan time. Two code changes accompany the dependency churn:SPIECE_UNDERLINEis inlined as"\u2581"since it was dropped from thetransformerspublic API in 5.x, and the HF-repo fallback logic inlive_tokenizer_repository.pyis cleaned up to avoid the anti-pattern of raisingRepositoryNotFoundErrorimmediately to catch it.Confidence Score: 5/5
Safe to merge; all findings are P2 style/behavioral notes, no logic defects introduced by the PR.
The changes are security-focused version bumps with verified Trivy results and smoke-test confirmation. The only notable risk is the transformers 4.x → 5.x major version jump's potential for subtle tokenization behavioral changes, but this is a P2 observation — no current defect is demonstrated. All other changes are straightforward version increments or minor code cleanups.
model-engine/requirements.in and model-engine/requirements.txt warrant attention due to the transformers 4.x → 5.x and huggingface-hub 0.x → 1.x major version jumps.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Docker Build - builder stage] --> B[pip install deps from requirements.txt] B --> C[pip install -r requirements_override.txt] C --> D[pip install -e . model-engine] D --> E[pip uninstall -y pip\nremoves pip CVE surface] E --> F[Build kubectl v1.35.4\nfixes moby/spdystream vuln] F --> G[Runtime image - model-engine stage] G --> H[Copy venv without pip] G --> I[Copy kubectl binary] J[live_tokenizer_repository.py] --> K{hf_repo set?} K -- Yes --> L[list_repo_refs on HF Hub] L -- Found --> M[Use HF repo directly] L -- RepositoryNotFoundError --> N[_load_tokenizer_from_s3] K -- No --> N O[model.py - Triton postprocessing] --> P[Use local SPIECE_UNDERLINE = U+2581\ninstead of transformers import]Prompt To Fix All With AI
Reviews (4): Last reviewed commit: "fix(model-engine): preserve tokenizer s3..." | Re-trigger Greptile