unsloth/scripts
Daniel Han ec411c3f74
Baseline the unsloth-zoo 2026.10.6 and transformers 5.20.0 scan findings after review (#13949)
## Summary

`Security audit` on main fails in `pip scan-packages :: hf-stack` and
`pip scan-packages :: studio` (run 38811240332 on 565630c6b4). 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.
2026-10-15 17:54:53 -07:00
..
data Strip distro .devN markers from the Colab pins (#11326) 2026-09-19 02:16:39 -07:00
windows_sac_probe SAC probe: verify Studio identity before sending a password (#12176) 2026-09-28 01:17:56 -07:00
av_shapes_baseline.json Trim comments in tests (#13844) 2026-10-15 05:30:27 -07:00
build_prequant_checkpoint.py Studio: judge hosted pre-quant checkpoints before downloading them, and make the int8 fingerprint torchao-version-neutral (#13339) 2026-10-12 04:15:13 -07:00
build_te_int8_convrot_checkpoint.py Studio: int8 ConvRot text encoder for Qwen-Image-2.1, fp8 fallback (#12684) 2026-10-05 08:09:24 -07:00
build_te_prequant_checkpoint.py Use Unsloth for bare Studio product references (#9732) 2026-08-26 01:55:49 -07:00
build_whisper_cpp.sh Keep the regenerable caches inside the Studio root (#10597) 2026-09-20 06:20:41 -07:00
check_frontend_dep_removal.py Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00
check_new_install_scripts.py Trim comments in tests, scripts, CI helpers and unsloth_cli (#10113) 2026-09-04 15:31:50 -07:00
clef_train_bench.py Train any text or vision LLM as a Clef decision model from Studio, with FastDecisionModel.predict and adapter saves (#12876) 2026-10-07 05:52:14 -07:00
compare_engines.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
compile_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
convert_prequant_to_safetensors.py Studio: read pre-quantized diffusion checkpoints from safetensors on torchao 0.17, 0.18 and main (#12645) 2026-10-04 04:57:38 -07:00
diffusion_bench.py Studio: whole-model NVFP4 for the video families with hosted pre-quantized denoisers (#10729) 2026-09-25 16:22:17 -07:00
diffusion_quality.py Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00
enforce_kwargs_spacing.py Let the formatter fixed-point guard start on Windows (#11145) 2026-09-16 20:02:06 -07:00
exec_literals_baseline.json AsyncGRPOTrainer: optional SAO-style importance sampling mask (#13820) 2026-10-15 05:35:13 -07:00
fbcache_flux_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
fp8_overflow_check.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
image_speedmem_bench.py Studio: auto step cache (FBCache) only on the max speed tier (#11791) 2026-09-25 11:23:46 -07:00
install_gemma4_mlx.sh Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00
install_qwen3_6_mlx.sh Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00
install_rocm_wsl_strixhalo.sh fix(amd): turn on PyTorch's fast ROCm attention kernels on import unsloth, and drop the installers' host-wide export (#8821) 2026-09-15 06:53:48 -07:00
int8_linear_probe.py Trim comments in tests, scripts, CI helpers and unsloth_cli (#10113) 2026-09-04 15:31:50 -07:00
kv_cache_multiturn_benchmark.py Fix: Support past_key_values in model.generate for multi-turn conversations (#4232) 2026-09-29 11:59:43 -07:00
leverage_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
lint_av_shapes.py Unpack the mirrored uv wheel with python3 -m zipfile instead of an inline one-liner (#12194) 2026-09-28 07:09:49 -07:00
lint_backend_python_floor.py Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00
lint_duplicate_definitions.py Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00
lint_exec_literals.py Skip Unsloth's generated compile cache in the exec-literal lint (#12014) 2026-09-26 03:05:13 -07:00
lint_no_duplicate_ts_imports.py Fail Source lint on a duplicate TypeScript import binding (#8548) 2026-09-21 03:20:51 -07:00
lint_no_parallel_clamp.py Trim comments in tests, scripts, CI helpers and unsloth_cli (#10113) 2026-09-04 15:31:50 -07:00
lint_risky_loaders.py Add a fast lint gate for risky loader call sites (#12636) 2026-10-03 12:16:19 -07:00
lint_workflow_triggers.py Pin the last 53 mutable action tags, and give the cache lint the direction it lacked (#11518) 2026-09-23 02:31:51 -07:00
lockfile_supply_chain_audit.py Studio Desktop: stop the launch-time PATH probe from rewriting shell history (#12846) 2026-10-06 06:55:01 -07:00
make_dmg_background.py Trim comments in tests, scripts, CI helpers and unsloth_cli (#10113) 2026-09-04 15:31:50 -07:00
notebook_to_python.py Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00
notebook_validator.py Acknowledge the Colab oracle drift, and stop the diff hiding entries (#11324) 2026-09-19 00:04:01 -07:00
nvfp4_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
nvfp4_t211_probe.py Trim comments in tests, scripts, CI helpers and unsloth_cli (#10113) 2026-09-04 15:31:50 -07:00
online_tokenization_ab.py Trim comments in tests, scripts, CI helpers and unsloth_cli (#10113) 2026-09-04 15:31:50 -07:00
p2p_integrity_probe.py Use Unsloth branding in remaining user-facing text (#11254) 2026-09-18 01:58:29 -07:00
perf_levers_probe.py Trim comments in tests, scripts, CI helpers and unsloth_cli (#10113) 2026-09-04 15:31:50 -07:00
perf_verify.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
prequant_probe.py Trim comments in tests, scripts, CI helpers and unsloth_cli (#10113) 2026-09-04 15:31:50 -07:00
profile_startup.py Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00
quant_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
risky_loaders_baseline.json Diffusion LM training: compiled chunked loss with 0 graph breaks, plus per-family samplers (#13341) 2026-10-13 09:26:57 -07:00
run_ruff_format.py Refuse to format when ruff cannot run, and stop the fixed-point guard skipping itself away in CI (#10726) 2026-09-10 06:07:15 -07:00
scan_npm_packages.py Harden installer source selection, ROCm helper staging and npm scanner cleanup (#12402) 2026-10-01 01:47:37 -07:00
scan_npm_packages_baseline.json scan_packages: key baseline on matched-code hash so payloads in baselined files are not auto-suppressed (#6552) 2026-07-01 04:03:59 -07:00
scan_packages.py Baseline the eight unsloth-zoo 2026.10.1 findings after review (#12884) 2026-10-06 12:20:37 -07:00
scan_packages_baseline.json Baseline the unsloth-zoo 2026.10.6 and transformers 5.20.0 scan findings after review (#13949) 2026-10-15 17:54:53 -07:00
sd_cpp_smoke.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
sdpa_mask_backend_probe.py Trim comments in tests, scripts, CI helpers and unsloth_cli (#10113) 2026-09-04 15:31:50 -07:00
sparse_accum_probe.py Trim comments in tests, scripts, CI helpers and unsloth_cli (#10113) 2026-09-04 15:31:50 -07:00
stamp_studio_release.py Let the formatter fixed-point guard start on Windows (#11145) 2026-09-16 20:02:06 -07:00
sync_allow_scripts_pins.py Let the formatter fixed-point guard start on Windows (#11145) 2026-09-16 20:02:06 -07:00
sync_shared_ps1_helpers.py feat(install): fall back to CERNET and npmmirror when package hosts are blocked or slow (#11786) 2026-09-26 02:57:24 -07:00
train_decision_from_lm.py Decision models: follow-up fixes after #12772, #12876, #12939 (#12949) 2026-10-07 09:06:56 -07:00
uninstall.ps1 Studio Desktop: choose where Unsloth installs on Windows (#13446) 2026-10-15 05:16:12 -07:00
uninstall.sh Studio: mention the leftover uv cache in uninstall (#10442) 2026-10-05 01:10:12 -07:00
update_lemonade_pins.py Installers: hash-check the uv fallback script; fail closed on undigested Lemonade assets (#13189) 2026-10-09 20:12:59 -07:00
verify_comment_only_diff.py Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00
verify_import_hoist.py Studio: read the local model cache locally, and keep host paths off the API (#11026) 2026-09-20 20:36:27 -07:00
verify_prequant_backend.py Studio: whole-model NVFP4 for the video families with hosted pre-quantized denoisers (#10729) 2026-09-25 16:22:17 -07:00
video_quality.py Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00
virustotal_delta.py Give this work a before-and-after number, and find out the hardening already worked (#10996) 2026-09-15 11:40:42 -07:00
virustotal_scan.py Reduce comment volume across the installers, CLI, unsloth package and backend utilities (#10504) 2026-09-10 05:57:33 -07:00