Repository navigation
Re-approve the four unsloth-zoo findings that 2026.9.5 reopened - #11240
Conversation
Security audit is red on main: pip scan-packages :: hf-stack reports 2 CRITICAL
and 2 HIGH unbaselined, all of them first-party unsloth-zoo code that has been
reviewed and approved before. Reproduced locally by scanning the package alone,
which gives the same four.
All four are the scanner matching our own defences and idioms:
vision_utils.py Harvests env vars + network. The env var is
UNSLOTH_ALLOW_PRIVATE_URL_FETCH, the opt-in gate on the SSRF
guard, and the network line is the requests session the guard
protects.
vision_utils.py IMDS + network. "metadata.google.internal" is in the guard's
BLOCKLIST. The file is flagged for refusing to fetch IMDS.
compiler.py Obfuscation + exec. A dynamic __import__ of a model module,
plus the training banner, whose chr(92) backslashes draw the
sloth.
mlx/loader.py Obfuscation + exec. A dynamic __import__, plus mx.eval, which
is MLX forcing evaluation of a lazy array and has nothing to
do with Python eval.
Two of them did not change at all. compiler.py and mlx/loader.py carry the same
evidence hashes the baseline already holds, bdfae4c24572 and cf9c8ed7bf9c; they
reopened because their file_sha256 pins no longer match a file the release
touched elsewhere. The two vision_utils findings do have new evidence hashes.
Pinned, not unpinned. I first added these without a digest, which is what the
scanner writes, and tests/security/test_scan_packages.py rejected it:
test_context_dependent_unsloth_zoo_findings_are_digest_pinned says the approval
has to be for the file as reviewed rather than for the matched lines, because an
unpinned entry would suppress the finding whatever the file later contains. The
digests are of the files as they ship in the 2026.9.5 sdist.
Verified: scan_packages.py unsloth-zoo exits 0 with nothing unbaselined, and
tests/security/ has the same 12 failures on this branch as on main, with an empty
diff between the two lists. Those 12 are this venv's broken `import unsloth`,
not related to the baseline.
Codex Review SummaryThis 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. |
|
@codex review |
|
@codex security 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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…othai#11240) Security audit is red on main: pip scan-packages :: hf-stack reports 2 CRITICAL and 2 HIGH unbaselined, all of them first-party unsloth-zoo code that has been reviewed and approved before. Reproduced locally by scanning the package alone, which gives the same four. All four are the scanner matching our own defences and idioms: vision_utils.py Harvests env vars + network. The env var is UNSLOTH_ALLOW_PRIVATE_URL_FETCH, the opt-in gate on the SSRF guard, and the network line is the requests session the guard protects. vision_utils.py IMDS + network. "metadata.google.internal" is in the guard's BLOCKLIST. The file is flagged for refusing to fetch IMDS. compiler.py Obfuscation + exec. A dynamic __import__ of a model module, plus the training banner, whose chr(92) backslashes draw the sloth. mlx/loader.py Obfuscation + exec. A dynamic __import__, plus mx.eval, which is MLX forcing evaluation of a lazy array and has nothing to do with Python eval. Two of them did not change at all. compiler.py and mlx/loader.py carry the same evidence hashes the baseline already holds, bdfae4c24572 and cf9c8ed7bf9c; they reopened because their file_sha256 pins no longer match a file the release touched elsewhere. The two vision_utils findings do have new evidence hashes. Pinned, not unpinned. I first added these without a digest, which is what the scanner writes, and tests/security/test_scan_packages.py rejected it: test_context_dependent_unsloth_zoo_findings_are_digest_pinned says the approval has to be for the file as reviewed rather than for the matched lines, because an unpinned entry would suppress the finding whatever the file later contains. The digests are of the files as they ship in the 2026.9.5 sdist. Verified: scan_packages.py unsloth-zoo exits 0 with nothing unbaselined, and tests/security/ has the same 12 failures on this branch as on main, with an empty diff between the two lists. Those 12 are this venv's broken `import unsloth`, not related to the baseline.
Security auditis red onmain.pip scan-packages :: hf-stackreports 2 CRITICAL and 2 HIGH unbaselined, all of them first-party unsloth-zoo code that has been reviewed and approved before. Reproduced locally by scanning the package on its own, which gives the same four.What the four actually are
Every one is the scanner matching our own defences and idioms:
vision_utils.pyUNSLOTH_ALLOW_PRIVATE_URL_FETCH, the opt-in gate on the SSRF guard; the network line is therequestssession the guard protectsvision_utils.pymetadata.google.internalis in the guard's blocklist. The file is flagged for refusing to fetch IMDScompiler.py__import__of a model module, plus the training banner, whosechr(92)backslashes draw the slothmlx/loader.py__import__, plusmx.eval, which is MLX forcing evaluation of a lazy array and has nothing to do with PythonevalTwo of them did not change at all
compiler.pyandmlx/loader.pycarry exactly the evidence hashes the baseline already holds,bdfae4c24572andcf9c8ed7bf9c. They reopened because theirfile_sha256pins stopped matching after the release touched those files elsewhere. Only the twovision_utils.pyfindings have genuinely new evidence hashes.Pinned, not unpinned
I first added these without a digest, which is what
scan_packages.pywrites when it emits a fresh entry.tests/security/test_scan_packages.pyrejected that, correctly:The approval has to be for the file as it was reviewed rather than for the matched lines, because an unpinned entry would suppress the finding whatever the file later contains, and a payload added to the same file would ride it. So the four entries carry the digests of the files as they ship in the 2026.9.5 sdist.
That guard also documents why this matters: #10187 moved the baseline digest but left a duplicate copy in the test behind, and the disagreement took
Repo tests (CPU)andworkflow-trigger lintdown on every open PR.Verification
python scripts/scan_packages.py unsloth-zooexits 0, nothing unbaselined, 12 findings suppressed.tests/security/has the same 12 failures on this branch as onmain, and the diff between the two failure lists is empty. Those 12 are this environment's brokenimport unsloth, unrelated to the baseline.