Skip to content

Baseline the unsloth-zoo 2026.10.4 and trl 1.15.0 findings after review - #13472

Merged
danielhanchen merged 1 commit into
mainfrom
ci-baseline-zoo-2026-10-4-trl-1-15
Oct 12, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-baseline-zoo-2026-10-4-trl-1-15

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Problem

pip scan-packages :: hf-stack (security-audit.yml) fails on every main push since about 09:00 today, and on PRs that touch dependencies, such as #13432. The last green main run was 09:00 on 160cb41fe1. Two upstream releases reopened reviewed entries:

  • unsloth-zoo 2026.10.4 (published Oct 12, 13:52). Its entries are pinned to file_sha256, so any change to these files reopens them: compiler.py, llama_cpp.py, mlx/loader.py, temporary_patches/gpt_oss.py, temporary_patches/moe_utils.py, vision_utils.py, vllm_utils.py. Two new modules also hit the obfuscation check: mlx/decision.py and mlx/speculative.py.
  • trl 1.15.0. The scan reaches it now that the trl cap admits 1.15.0. It changed the matched lines of trl/experimental/async_grpo/vllm_client.py and trl/experimental/async_distillation/vllm_client.py.

Reproduced locally with python scripts/scan_packages.py unsloth-zoo==2026.10.4 trl==1.15.0: 6 CRITICAL and 6 HIGH unbaselined findings, the same set as the CI log.

Review

unsloth-zoo 2026.10.4. I diffed every flagged file against 2026.10.3.

Provenance: all seven changed files are byte-identical to unslothai/unsloth-zoo at e5db934d6a (the 2026.10.4 version bump), apart from the CRLF line endings the wheel already had in 2026.10.3.

None of the changes adds a network call, credential read or remote download:

  • temporary_patches/moe_utils.py: the only new subprocess.run is a ROCm-only crash probe. It runs a fixed torch._grouped_mm snippet in a child sys.executable (no shell, stdout/stderr discarded), so a kernel fault cannot kill the trainer. The rest is PEFT v5 fused-expert LoRA handling.
  • compiler.py: training-stance markers and logging behind UNSLOTH_ENABLE_LOGGING. The matched exec/compile lines are the existing compiled-module loader.
  • llama_cpp.py: converter sources and prebuilts are now staged from first-party unslothai/llama.cpp GitHub releases (releases/download/{tag}/llama.cpp-source-{tag}.tar.gz). Each archive is verified against the sha256 the release publishes in llama-prebuilt-sha256.json. Older ggml-org/llama.cpp markers are only read, never fetched from. No new host beyond github.com, and no credential is sent.
  • gpt_oss.py: a dense-eval row cap (unsloth#3411) and eager attention rows.
  • vision_utils.py, vllm_utils.py, mlx/loader.py: video-processor frame-count and fps handling, a KV-cache length fit, and an mlx-lm config backfill.
  • New mlx/decision.py: base64.b64decode of a data: URL into av.open (audio clips in chat records). The "exec" hits are mx.eval and model.eval().
  • New mlx/speculative.py: __import__(f"mlx_vlm.models.{family}.language") for a fixed family list, plus mx.eval.

trl 1.15.0 vs 1.14.2. Both vllm_client.py files now import requests behind is_requests_available(). The async-distillation client gains get_server_info, load_lora_adapter and unload_lora_adapter. All of these call the user-configured self.server_url vLLM server, exactly like the existing methods.

Change

12 entries appended to scripts/scan_packages_baseline.json. No existing entry is removed or modified.

  • The 10 unsloth-zoo entries are pinned to their 2026.10.4 file_sha256, like every other zoo module. The next zoo change reopens them for review.
  • The 2 trl entries stay unpinned, matching their existing trl 1.14 entries.

The entries come from --write-baseline with the in-effect baseline as source, so its pins carry over. The two new zoo modules were given a pinned site so they come out pinned too.

Verification

main baseline this PR
scan_packages.py unsloth-zoo==2026.10.4 trl==1.15.0 exit 1, 6 CRITICAL / 6 HIGH exit 0, 27 suppressed, 13 MEDIUM
tests/security/test_scan_packages.py 152 passed
tests/studio/install/test_diffusers_pin.py 54 passed

pip scan-packages :: hf-stack fails on main since unsloth-zoo 2026.10.4 shipped (Oct 12) and the trl cap reached 1.15.0. Ten zoo sites reopened because their digest-pinned files changed, plus two new zoo modules, and trl 1.15.0 changed the matched lines of its two experimental vllm_client.py files. All were read against the previous release and are benign; zoo entries are pinned to the 2026.10.4 file digests, trl entries stay unpinned as before.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T20:32:47.201139Z 256e679 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 256e679f16

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 12, 2026
@danielhanchen
danielhanchen merged commit d8696f7 into main Oct 12, 2026
@danielhanchen
danielhanchen deleted the ci-baseline-zoo-2026-10-4-trl-1-15 branch October 12, 2026 20:36
danielhanchen added a commit that referenced this pull request Oct 16, 2026
…ngs after review (#13949)

## Summary

`Security audit` on main fails in `pip scan-packages :: hf-stack` and
`pip scan-packages :: studio` (run 38811240332 on 565630c). Two new
upstream releases moved reviewed findings out of the baseline:

- **unsloth-zoo 2026.10.6** changed several files whose entries are
pinned to a file digest (`vision_utils.py`, `compiler.py`,
`vllm_utils.py`, `mlx/speculative.py`,
`temporary_patches/moe_utils.py`), changed the matched lines in
`mlx/decision.py` and `mlx/loader.py`, and added a new site in
`vllm_gdn_replayssm.py`.
- **transformers 5.20.0** shifted the `while True:` generator in
`testing_utils.py`, which the scanner reads as a polling loop.

No product change caused this; it is the expected churn of evidence-hash
and file-digest keyed entries on a new release, same as #13143, #13472
and #13701.

## Review

I diffed every flagged zoo file between 2026.10.5 (last baselined) and
2026.10.6. The added lines that touch the matched patterns are:

- `mx.eval(...)` MLX array evaluation calls and `model.eval()`
(decision.py, loader.py, speculative.py)
- reads of feature flags (`UNSLOTH_MOE_LORA_PAD_ALWAYS`,
`VLLM_MLA_DISABLE`, `UNSLOTH_VLLM_ONLINE_FP8`, `UNSLOTH_VLLM_REPLAYSSM`,
`VLLM_USE_V2_MODEL_RUNNER`, `UNSLOTH_VLLM_MERGED_ROLLOUT_RESTORE`)
- the `unsloth_fsdp_unshard` import and calls in the compiler header
(zoo #1766)
- the `mask_out_tokens` argument in `vision_utils.py`; the env and IMDS
hits there are still the SSRF guard that lists metadata hosts in order
to block them
- `vllm_gdn_replayssm._edit_method`, which recompiles a vLLM method from
its own `inspect.getsource` text after a textual edit, the same pattern
as the other vLLM patchers

None adds network access, subprocess use, encoded payloads or a new
destination.

The transformers hit is `evaluate_side_effect_factory` in
`testing_utils.py`, a test helper that yields the last value forever
(`while True: yield side_effect_values[-1]`). It was baselined at three
earlier line numbers already.

## Change

Ten entries appended to `scripts/scan_packages_baseline.json`, taken
from `scan_packages.py --write-baseline` over the two failing shards and
filtered to the flagged keys. Nothing is removed, so the older releases
stay covered, and pins carry over: every entry whose site was pinned
before is pinned to the 2026.10.6 file digest. The new
`vllm_gdn_replayssm.py` site is pinned too, since what it execs is
decided by the edit tables and source lookup elsewhere in the file, and
`tests/security/test_scan_packages.py` now requires that pin in both
context-dependent pin tests.

Excluded on purpose: the local run also flagged `multiprocess`, which
comes from a Python-version-specific wheel this host resolves and CI
does not.

## Testing

- Both shards rescanned locally against the new baseline: no unbaselined
unsloth-zoo or transformers finding remains.
- The baseline diff is additions only (10 entries).
- `tests/security/test_scan_packages.py`: 152 passed. Removing the new
pin makes
`test_context_dependent_unsloth_zoo_findings_are_digest_pinned` and
`test_context_dependent_unsloth_zoo_pins_reopen_on_other_file_changes`
fail.
danielhanchen added a commit that referenced this pull request Oct 20, 2026
## Summary

`Security audit` on main fails in `pip scan-packages :: hf-stack` (run
39357543071 on 22a0bea) with 2 CRITICAL and 5 HIGH unbaselined
findings, all in unsloth-zoo. unsloth-zoo 2026.10.7 reached PyPI
yesterday at 15:39, and the scan installs the latest release. Nothing in
this repo caused it; it is the expected churn of digest-pinned entries
on a zoo release, same as #13143, #13472, #13701 and #13949.

| File | Check | Why it reopened |
|---|---|---|
| `llama_cpp.py` | env + network | file digest changed, matched lines
unchanged |
| `compiler.py` | exec/eval | file digest changed, matched lines
unchanged |
| `vllm_utils.py` | exec/eval | file digest changed, matched lines
unchanged |
| `mlx/loader.py` | exec/eval | file digest changed, matched lines
unchanged |
| `mlx/speculative.py` | exec/eval | file digest changed, matched lines
unchanged |
| `temporary_patches/moe_utils.py` | exec/eval | file digest changed,
matched lines unchanged |
| `triton_kernels_compat.py` | downloads and executes remote code | new
matched lines |

## Review

I diffed each of the seven files between 2026.10.6 (last baselined) and
2026.10.7 and searched the added lines for network, subprocess,
exec/eval/compile, encoding, pickle, ctypes and environment access. What
they add:

- `triton_kernels_compat.py`: the flagged lines are
`importlib.import_module(self.name + ".topk")` and
`".tensor_details.ragged_tensor"`, which import fixed submodules of an
already installed `triton_kernels` package or vLLM's vendored copy. The
new `UNSLOTH_TRITON_KERNELS_SOURCE` flag (`auto | triton_kernels |
vllm`) only picks which of those two to import. Nothing is downloaded.
- `vllm_utils.py`, `temporary_patches/moe_utils.py`: feature flags
(`UNSLOTH_VLLM_SUFFIX_DECODING`, `UNSLOTH_VLLM_FP32_LM_HEAD`,
`UNSLOTH_MOE_DEQUANT_CHUNK_EXPERTS`, `UNSLOTH_MOE_SELECTIVE_DEQUANT`).
- `mlx/loader.py`: on MLX >= 0.32.4, imports the mlx-vlm modules named
in a fixed table (`_EXACT_VERIFY_SUM_SOURCES`) and uses two regexes to
promote their verify-kernel sums to float32.
- `llama_cpp.py`, `compiler.py`, `mlx/speculative.py`: no added line
touches any of those patterns.

None adds network access, subprocess use, encoded payloads or a new
destination.

## Change

Seven entries added to `scripts/scan_packages_baseline.json`, taken from
`scan_packages.py --write-baseline` over `unsloth-zoo==2026.10.7` and
filtered to the unbaselined keys. Each is pinned to its 2026.10.7 file
digest, as the previous entries for these files were, and sits next to
them. Nothing is removed, so older releases stay covered.

## Testing

- `scan_packages.py unsloth-zoo==2026.10.7`: exits 0 with this baseline;
with main's baseline it exits 1 with the same seven findings as CI.
- `scan_packages.py unsloth-zoo==2026.10.6` still exits 0.
- `tests/security/test_scan_packages.py`: 152 passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant