Skip to content

Security audit: re-pin six reviewed unsloth-zoo 2026.11.10 sites in the package scan baseline - #19250

Merged
danielhanchen merged 1 commit into
mainfrom
ci/scan-baseline-zoo-2026-11-10
Nov 24, 2026
Merged

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

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

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.

…he package scan baseline

unsloth-zoo 2026.11.10 changed compiler.py, mlx/decision.py,
temporary_patches/moe_utils.py, vision_utils.py and vllm_utils.py, so their
reviewed sites fall outside the file digest pins and pip scan-packages ::
hf-stack fails on every PR. The flagged code is unchanged (same evidence
hash); the rest of each diff since 2026.11.9 was reviewed. Append six
entries pinned to the 2026.11.10 digests; no existing entry is changed.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T12:23:35.162146Z 796b969 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. More of your lovely PRs please.

Reviewed commit: 796b969e39

ℹ️ 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 ad6f182 into main Nov 24, 2026
0 of 23 checks passed
@danielhanchen
danielhanchen deleted the ci/scan-baseline-zoo-2026-11-10 branch November 24, 2026 12:25
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