Repository navigation
Security audit: re-pin six reviewed unsloth-zoo 2026.11.7 sites in the package scan baseline - #18551
Merged
Merged
Conversation
…e package scan baseline
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. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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 21, 2026
…the package scan baseline (#18724) ## Summary `Security audit` / `pip scan-packages :: hf-stack` fails on `main` (push runs on `755f6a3467`, `fe5340fc99` and `d7dbe6ffc0`) and on every PR that runs it, for example #16729: ``` Summary: 3 CRITICAL, 4 HIGH, 175 MEDIUM 7 of the 182 finding(s) above are at a site already reviewed in scripts/scan_packages_baseline.json. What differs from the reviewed entry: HIGH unsloth-zoo unsloth_zoo/compiler.py same matched code, file digest outside the pin CRITICAL unsloth-zoo unsloth_zoo/device_type.py same matched code, file digest outside the pin HIGH unsloth-zoo unsloth_zoo/mlx/speculative.py same matched code, file digest outside the pin HIGH unsloth-zoo unsloth_zoo/temporary_patches/moe_utils.py same matched code, file digest outside the pin CRITICAL unsloth-zoo unsloth_zoo/vision_utils.py (env + network) same matched code, file digest outside the pin CRITICAL unsloth-zoo unsloth_zoo/vision_utils.py (IMDS + network) same matched code, file digest outside the pin HIGH unsloth-zoo unsloth_zoo/vllm_utils.py same matched code, file digest outside the pin ``` ## Root cause unsloth-zoo 2026.11.8 was published on 2026-11-20 at 19:39 UTC. The scanner pins each reviewed site to the file digest it was reviewed at, so a new zoo release reopens its sites until they are re-reviewed. This is by design and matches the earlier re-pins (#18551, #17999, #17421). ## Re-review All seven sites have the same evidence hash as an already reviewed entry, so the matched code is unchanged: - `device_type.py`, `vision_utils.py` (both checks), `temporary_patches/moe_utils.py`: evidence text is byte-identical to the reviewed entry. - `compiler.py`, `vllm_utils.py`, `mlx/speculative.py`: evidence text is identical except for line numbers, because other code in the file moved. ## Changes - `scripts/scan_packages_baseline.json`: seven new entries, one per site, each pinned to the 2026.11.8 file digest and inserted after that site's previous entries. No existing entry is changed or removed (63 lines added, 0 removed), so no reviewed pin is widened. ## Testing - `python scripts/scan_packages.py unsloth-zoo==2026.11.8` against the baseline on `main`: exit 1 with the seven findings above. - The same scan against this branch's baseline: exit 0 (`Summary: 15 MEDIUM`, 23 findings suppressed by baseline). - `tests/security/test_scan_packages.py`: 152 passed.
danielhanchen
added a commit
that referenced
this pull request
Nov 23, 2026
…the package scan baseline (#19030) ## Summary `Security audit` / `pip scan-packages :: hf-stack` fails on every PR that runs it (for example the run for #19000 on top of current `main`): ``` 5 of the 183 finding(s) above are at a site already reviewed in scripts/scan_packages_baseline.json. What differs from the reviewed entry: CRITICAL trl trl/experimental/async_distillation/vllm_client.py 1 matched line(s) added and 1 gone: the flagged code was rewritten HIGH unsloth-zoo unsloth_zoo/compiler.py same matched code, file digest outside the pin CRITICAL unsloth-zoo unsloth_zoo/vision_utils.py (env+network) same matched code, file digest outside the pin CRITICAL unsloth-zoo unsloth_zoo/vision_utils.py (IMDS+network) same matched code, file digest outside the pin HIGH unsloth-zoo unsloth_zoo/vllm_utils.py same matched code, file digest outside the pin ``` 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: - unsloth-zoo 2026.11.9. The scanner pins each reviewed zoo site to the file digest it was reviewed at, so a release reopens its sites until they are re-reviewed. Same as the earlier re-pins (#18724, #18551, #17999). - trl 1.18.2 (the requirement cap is `trl<=1.18.2`). It moved the async GRPO vLLM client to `trl/generation/async_vllm_client.py` and shifted the `while 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 digests `4fcbb4cb25...`, `bc3e71536d...`, `e21b70aab1...`) to 2026.11.9: - `compiler.py`: the temp compile folder ownership check now also rejects group-writable folders (`0o002` to `0o022`), and two Inkling 2 attention residual classes join the do-not-compile list. - `vision_utils.py`: the UNC / network-share guard now also decodes `bytes` and `PathLike` paths 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 reviewed `exec` / `eval` lines. - `trl/experimental/async_distillation/vllm_client.py` and `trl/generation/async_vllm_client.py`: both flagged loops are `wait_for_server_ready`, which polls `{server_url}/health` on the user-configured vLLM server every 2 s and raises `TimeoutError` after `timeout`. Every request in both files goes to `self.server_url`; no environment reads, subprocess, `exec` or encoded payloads. Same loop as the already reviewed `async_grpo/vllm_client.py` and `async_distillation/vllm_client.py` entries. ## 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. - The local scan also reports two `multiprocess` sites; 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.2` against `main`'s baseline: exit 1, `4 CRITICAL, 2 HIGH`, the six sites above. - The same scan against this branch's baseline: exit 0 (`Summary: 21 MEDIUM`, 26 findings suppressed by baseline). - `tests/security/test_scan_packages.py`: 152 passed. - Full hf-stack requirement set (the workflow's `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.13 `multiprocess` sites remain, as expected on this host.
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 onmain(push run at 22:34 UTC) and on every PR that runs it, e.g. #16729:Root cause
unsloth-zoo 2026.11.7 was published today and the installers now require it (#18484). The scanner pins each reviewed site to the file digest it was reviewed at, so a new zoo release reopens its sites until they are re-reviewed. That is by design; the baseline already carries one entry per reviewed release for each of these files.
Re-review
unsloth_zoo/mlx/loader.py: the 3 newly matched lines are MLX array evaluation (mx.eval(...), which forces lazy MLX arrays to compute) andmodel.eval()(inference mode on a module). Neither runs Python'seval, and the__import__(module_name, fromlist=["_"])match in the same file is the already-reviewed site.Changes
scripts/scan_packages_baseline.json: six new entries, one per site, each pinned to the 2026.11.7 file digest and inserted after that site's previous entries, as for earlier releases. 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_zooagainst the baseline onmain: exit 1 with the six HIGH findings above.Summary: 15 MEDIUM, 24 findings suppressed by baseline).