Skip to content

Scan baseline: re-review the five unsloth-zoo sites 2026.11.1 moved - #16624

Merged
danielhanchen merged 1 commit into
mainfrom
scan-baseline-zoo-2026-11-1
Nov 4, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
scan-baseline-zoo-2026-11-1

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

pip scan-packages :: hf-stack fails on main (run 41772420551) and on every PR whose closure resolves unsloth-zoo 2026.11.1, which #16554 made the installer floor:

Summary: 5 HIGH, 13 MEDIUM
  5 of the 18 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
    HIGH  unsloth-zoo  unsloth_zoo/mlx/loader.py                          same matched code, file digest outside the pin
    HIGH  unsloth-zoo  unsloth_zoo/mlx/speculative.py                     9 matched line(s) added and 2 gone
    HIGH  unsloth-zoo  unsloth_zoo/temporary_patches/granitemoehybrid.py  2 matched line(s) appended to a reviewed file, none gone
    HIGH  unsloth-zoo  unsloth_zoo/temporary_patches/moe_utils.py         same matched code, file digest outside the pin

Review

File What changed in 2026.11.1 Verdict
unsloth_zoo/compiler.py Matched code identical to the reviewed entry; other lines in the file moved the pin Same as reviewed
unsloth_zoo/mlx/loader.py Same Same as reviewed
unsloth_zoo/temporary_patches/moe_utils.py Same Same as reviewed
unsloth_zoo/mlx/speculative.py Every new match is mx.eval(...) (MLX array materialisation) or model.eval(), not Python eval Benign
unsloth_zoo/temporary_patches/granitemoehybrid.py New _build_norm_forward: takes inspect.getsource of the installed transformers GraniteMoeHybridRMSNorm.forward, replaces the single return self.weight * hidden_states.to(input_dtype) line with a fixed dtype-cast template, and exec(compile(...))s it into the transformers module namespace Benign: the same source-patching pattern as the reviewed compiler.py sites; nothing is decoded, fetched or read from the environment

I read both files in the 2026.10.11 and 2026.11.1 wheels downloaded from PyPI.

Change

As in #16264, each new entry sits next to the reviewed entries for its file, pinned at the 2026.11.1 file digest. The entries were produced by scripts/scan_packages.py unsloth-zoo==2026.11.1 --write-baseline and copied in; the baseline was not regenerated, so every other package's entries are untouched. Nothing is removed, so shards that still resolve older zoo releases are unaffected. 45 added lines, one file.

Testing

  • scripts/scan_packages.py unsloth-zoo==2026.11.1: exit 1 on main (5 HIGH), exit 0 with this change (13 MEDIUM, unchanged).
  • scripts/scan_packages.py unsloth-zoo==2026.10.11: exit 0 before and after.
  • tests/security/test_scan_packages.py, tests/security/test_lint_av_shapes.py, tests/test_scripts_write_lf.py: 181 passed.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 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-11-04T06:33:10.494588Z 171c696 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. 🎉

Reviewed commit: 171c6966de

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

@danielhanchen
danielhanchen merged commit 0463e4e into main Nov 4, 2026
@danielhanchen
danielhanchen deleted the scan-baseline-zoo-2026-11-1 branch November 4, 2026 08:31
danielhanchen added a commit that referenced this pull request Nov 5, 2026
…16732)

## Summary

`pip scan-packages :: hf-stack` has failed on every main push since
unsloth-zoo 2026.11.2 reached PyPI (for example run 41961773939), and on
every PR whose closure resolves it, such as #16729:

```
Summary: 5 HIGH, 13 MEDIUM
  5 of the 18 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                     4 matched line(s) gone, none added
    HIGH  unsloth-zoo  unsloth_zoo/mlx/decision.py                 1 matched line(s) appended to a reviewed file, none gone
    HIGH  unsloth-zoo  unsloth_zoo/mlx/loader.py                   same matched code, file digest outside the pin
    HIGH  unsloth-zoo  unsloth_zoo/mlx/speculative.py              1 matched line(s) appended to a reviewed file, none gone
    HIGH  unsloth-zoo  unsloth_zoo/temporary_patches/moe_utils.py  same matched code, file digest outside the pin
```

## Review

I read the five files in the 2026.11.1 and 2026.11.2 wheels downloaded
from PyPI.

| File | What changed in 2026.11.2 | Verdict |
|---|---|---|
| `unsloth_zoo/compiler.py` | One reviewed `exec(...)` call was removed;
nothing new matched | Narrower than reviewed |
| `unsloth_zoo/mlx/decision.py` | New
`mx.eval(pipeline.model.parameters())` (MLX array materialisation, not
Python `eval`) | Benign |
| `unsloth_zoo/mlx/speculative.py` | New `mx.eval(tree.rank, tree.score,
tree.block.depth)` | Benign |
| `unsloth_zoo/mlx/loader.py` | Matched code identical to the reviewed
entry; other lines in the file moved the pin | Same as reviewed |
| `unsloth_zoo/temporary_patches/moe_utils.py` | Same | Same as reviewed
|

## Change

As in #16624, each new entry sits next to the reviewed entries for its
file, pinned at the 2026.11.2 file digest. The entries come from
`scripts/scan_packages.py unsloth-zoo==2026.11.2 --write-baseline` and
were copied in; the baseline was not regenerated, so every other
package's entries are untouched. Nothing is removed, so shards that
still resolve older zoo releases are unaffected. 45 added lines, one
file.

## Testing

- `scripts/scan_packages.py unsloth-zoo==2026.11.2`: exit 1 on main (5
HIGH), exit 0 with this change (13 MEDIUM, unchanged).
- `scripts/scan_packages.py unsloth-zoo==2026.11.1`: exit 0 with this
change.
- `tests/security/test_scan_packages.py`,
`tests/security/test_lint_av_shapes.py`,
`tests/test_scripts_write_lf.py`: 181 passed.
danielhanchen added a commit that referenced this pull request Nov 7, 2026
…16922)

## Summary

`pip scan-packages :: hf-stack` fails on main since unsloth-zoo
2026.11.3 reached PyPI at 14:20 UTC today (run 42237847432, on the
#16911 merge commit):

```
Summary: 3 CRITICAL, 4 HIGH, 172 MEDIUM
  7 of the 179 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/llama_cpp.py                    same matched code, file digest outside the pin
    HIGH      unsloth-zoo  unsloth_zoo/mlx/loader.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
```

This is the per-release re-review the digest pins are for, as in #16732
(2026.11.2) and #16624 (2026.11.1).

## Review

I read the seven files in the 2026.11.2 and 2026.11.3 wheels downloaded
from PyPI. In every file the matched code is unchanged (each new entry
has the same `evidence_hash` as an already reviewed one), and none of
the changed lines touch `exec`, `eval`, `compile`, `marshal`, `zlib`,
`base64`, `__import__`, environment reads, HTTP / socket calls or the
metadata address.

| File | What changed in 2026.11.3 | Verdict |
|---|---|---|
| `unsloth_zoo/llama_cpp.py` | unsloth-zoo#2414: reuse an intact
llama.cpp source checkout for LoRA export; when converter modules are
missing and auto install is on, `pip install gguf protobuf sentencepiece
mistral_common` through the existing `try_execute` / `check_pip` | Same
as reviewed |
| `unsloth_zoo/vision_utils.py` | unsloth-zoo#2411 / #2415: PyAV
fallback converts only the sampled frames, `torch.from_numpy` for decord
clips, `startswith` fast path for the prompt prefix | Same as reviewed |
| `unsloth_zoo/compiler.py` | unsloth-zoo#2417: read def names once
instead of a regex per name | Same as reviewed |
| `unsloth_zoo/mlx/loader.py` | unsloth-zoo#2412 / #2407: mlx-vlm 0.7.12
source hashes for MiniCPM-V 4.7 | Same as reviewed |
| `unsloth_zoo/temporary_patches/moe_utils.py` | unsloth-zoo#2413:
prefer the per-expert loop over the Triton grouped GEMM below sm80 |
Same as reviewed |
| `unsloth_zoo/vllm_utils.py` | unsloth-zoo#2410: collect only the LoRA
subtrees in `load_lora` | Same as reviewed |

## Change

As in #16732, each new entry sits right after the reviewed entries for
its file, pinned at the 2026.11.3 file digest. The entries come from
`scripts/scan_packages.py unsloth-zoo==2026.11.3 --write-baseline` and
were copied in; the baseline was not regenerated, so every other
package's entries are untouched. Nothing is removed, so shards that
still resolve older zoo releases are unaffected. 63 added lines, one
file.

## Testing

- `scripts/scan_packages.py unsloth-zoo==2026.11.3`: exit 1 on main (3
CRITICAL, 4 HIGH), exit 0 with this change (13 MEDIUM).
- `scripts/scan_packages.py unsloth-zoo==2026.11.2` and `==2026.11.1`:
exit 0 with this change.
- `tests/security/test_scan_packages.py`,
`tests/security/test_lint_av_shapes.py`,
`tests/test_scripts_write_lf.py`: 181 passed.
danielhanchen added a commit that referenced this pull request Nov 10, 2026
…17421)

## Summary

`pip scan-packages :: hf-stack` fails on main since unsloth-zoo
2026.11.4 reached PyPI (run 42852360538, on the #17385 merge commit):

```
Summary: 2 CRITICAL, 5 HIGH, 173 MEDIUM
  7 of the 180 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
    HIGH      unsloth-zoo  unsloth_zoo/mlx/decision.py                 same matched code, file digest outside the pin
    HIGH      unsloth-zoo  unsloth_zoo/saving_utils.py                 1 matched line(s) gone, none added
    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
```

This is the per-release re-review the digest pins are for, as in #16922
(2026.11.3), #16732 (2026.11.2) and #16624 (2026.11.1).

## Review

I read the six files in the 2026.11.3 and 2026.11.4 wheels downloaded
from PyPI.

- Six of the seven new entries have the same `evidence_hash` as an
already reviewed entry: the matched code is unchanged and only the file
digest moved.
- In `saving_utils.py` one of the two `__import__("transformers",
fromlist = [model_class_name])` lines is gone and nothing was added. Its
entry was unpinned before and stays unpinned.
- None of the changed lines add `exec`, `eval`, `compile`, `marshal`,
`zlib`, `__import__`, environment reads, HTTP or socket calls, or the
metadata address.

| File | What changed in 2026.11.4 | Verdict |
|---|---|---|
| `unsloth_zoo/compiler.py` | MHC projection rewrites become a tuple of
`(old, new)` pairs instead of one source and replacement | benign |
| `unsloth_zoo/mlx/decision.py` | decision loads install the MLX
`model_file` guard, so a repository `config.json` cannot run code |
benign, hardening |
| `unsloth_zoo/saving_utils.py` | safetensors header reads reuse the
mapped header, and previous export shards are snapshotted and kept; one
duplicate `__import__` removed. The "metadata" here is safetensors
header metadata, not IMDS | benign |
| `unsloth_zoo/temporary_patches/moe_utils.py` | MoE backward pads the
stored expert rows instead of the transposed view | benign |
| `unsloth_zoo/vision_utils.py` | data URI parsing accepts any parameter
that prefixes `base64`, as FFmpeg does | benign |
| `unsloth_zoo/vllm_utils.py` | vLLM spawn and FlashInfer fallbacks pop
`VLLM_USE_FLASHINFER_SAMPLER` / `VLLM_USE_V2_MODEL_RUNNER` and reword
the standby hints | benign |

## Change

`scripts/scan_packages_baseline.json` gains the seven entries for the
2026.11.4 files. Each one sits next to the entry it re-reviews. No entry
is removed or widened, so 2026.11.3 installs still match their own pins.

## Testing

- `scripts/scan_packages.py -r` on `unsloth-zoo==2026.11.4`: exits 1
against main's baseline (2 CRITICAL, 5 HIGH) and 0 with this one (24
suppressed, 13 MEDIUM).
- The baseline tests (`git grep -l scan_packages_baseline -- tests`):
218 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