Repository navigation
Security audit: re-pin unsloth-zoo 2026.11.9 and trl 1.18.2 sites in the package scan baseline - #19030
Merged
Conversation
…the package scan baseline
Member
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
danielhanchen
added a commit
that referenced
this pull request
Nov 24, 2026
…he package scan baseline (#19250) ## Problem `Security audit` / `pip scan-packages :: hf-stack` fails on every PR that runs it, for example #19238: ``` Summary: 2 CRITICAL, 4 HIGH, 177 MEDIUM HIGH unsloth-zoo unsloth_zoo/compiler.py (Advanced obfuscation (marshal/compile/zlib) + exec/eval) HIGH unsloth-zoo unsloth_zoo/mlx/decision.py (Advanced obfuscation (marshal/compile/zlib) + exec/eval) HIGH unsloth-zoo unsloth_zoo/temporary_patches/moe_utils.py (Advanced obfuscation (marshal/compile/zlib) + exec/eval) HIGH unsloth-zoo unsloth_zoo/vllm_utils.py (Advanced obfuscation (marshal/compile/zlib) + exec/eval) ``` plus the two `vision_utils.py` CRITICAL sites (env + network, IMDS + network). ## Root cause unsloth-zoo 2026.11.10 was released, and no PR here caused it. The scanner pins each reviewed zoo site to the file digest it was reviewed at, so a release that edits those files reopens their sites until they are re-reviewed. This is the same as the earlier re-pins (#19030, #18724). For all six sites the scanner reports "same matched code, file digest outside the pin": the evidence hash matches the reviewed entry, so the flagged lines themselves are unchanged. ## Re-review The pin covers the whole file, so I diffed each one from 2026.11.9 to 2026.11.10: - `vision_utils.py`: media fetches now pass an explicit `auth`. - A netrc `default` entry and plain-http URLs no longer receive the user's saved credentials. - An https host the netrc names explicitly, or credentials written into the URL, still do. - Stricter, not looser. No new destination. - `vllm_utils.py`: the adapter staging folder is created owner-only (`0o700`), and a re-save keeps the mode of the file it replaces. - `mlx/decision.py`: the same owner-only and keep-the-mode handling for saved weights (`private_staging` helpers). - `compiler.py`: - Inkling 2 residual modules stay eager through a custom op inside compiled graphs. - Inkling 2's softcap module is inlined for the fused LM-head loss. - The fused loss is skipped when the LM head needs its module forward. - `temporary_patches/moe_utils.py`: an automatic cap on MoE dequant scratch memory, read from the local `UNSLOTH_MOE_DEQUANT_*` settings, recorded once per checkpointed call so the backward replay matches. None adds a network destination, subprocess, encoded payload or dynamic code path beyond the reviewed `exec` / `eval` lines. ## Changes `scripts/scan_packages_baseline.json`: six new entries pinned to the 2026.11.10 file digests. They are appended at the end; no existing entry is changed or removed (54 lines added, 0 removed), so no reviewed pin is widened. ## Testing - `python scripts/scan_packages.py unsloth-zoo==2026.11.10`: - against `main`'s baseline: exit 1, `2 CRITICAL, 4 HIGH`, the six sites above; - against this branch's baseline: exit 0, `Summary: 17 MEDIUM`, 23 findings suppressed. - `tests/security/test_scan_packages.py`: 152 passed.
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
Security audit/pip scan-packages :: hf-stackfails on every PR that runs it (for example the run for #19000 on top of currentmain):plus one site with no reviewed entry at all:
trl/generation/async_vllm_client.py(C2 polling loop).Root cause
Two new releases, neither caused by a PR here:
trl<=1.18.2). It moved the async GRPO vLLM client totrl/generation/async_vllm_client.pyand shifted thewhile True:in the async distillation client from L56 to L55, which changes the evidence hash.Re-review
unsloth_zoo/compiler.py,vision_utils.py(both checks),vllm_utils.py: evidence hash identical to the reviewed entries, so the flagged lines are unchanged. Since the pin covers the whole file, I diffed each file from 2026.11.8 (the pinned digests4fcbb4cb25...,bc3e71536d...,e21b70aab1...) to 2026.11.9:compiler.py: the temp compile folder ownership check now also rejects group-writable folders (0o002to0o022), and two Inkling 2 attention residual classes join the do-not-compile list.vision_utils.py: the UNC / network-share guard now also decodesbytesandPathLikepaths before checking them. Stricter, not looser.vllm_utils.py: speculative decoding support (config parsing and validation, redaction of credentials nested in the speculative config before vLLM logs it, draft weight sizing via the Hub for the user-named draft repo) and a cuBLAS workspace hold during CUDA graph capture. No new network destination, subprocess, or dynamic code path beyond the reviewedexec/evallines.trl/experimental/async_distillation/vllm_client.pyandtrl/generation/async_vllm_client.py: both flagged loops arewait_for_server_ready, which polls{server_url}/healthon the user-configured vLLM server every 2 s and raisesTimeoutErroraftertimeout. Every request in both files goes toself.server_url; no environment reads, subprocess,execor encoded payloads. Same loop as the already reviewedasync_grpo/vllm_client.pyandasync_distillation/vllm_client.pyentries.Changes
scripts/scan_packages_baseline.json: six new entries (four zoo entries pinned to the 2026.11.9 file digests, two trl entries keyed on the new evidence). Appended at the end; no existing entry is changed or removed (52 lines added, 0 removed), so no reviewed pin is widened.multiprocesssites; those only appear under Python 3.13 and CI scans on 3.12, so they are left out.Testing
python scripts/scan_packages.py unsloth-zoo==2026.11.9 trl==1.18.2againstmain's baseline: exit 1,4 CRITICAL, 2 HIGH, the six sites above.Summary: 21 MEDIUM, 26 findings suppressed by baseline).tests/security/test_scan_packages.py: 152 passed.audit-reqs/unsloth-deps.txt+no-torch-runtime.txt,--with-deps) against this branch: the six sites above are suppressed; only the two Python 3.13multiprocesssites remain, as expected on this host.