Repository navigation
Baseline the thirteen unsloth-zoo 2026.9.8 findings after review - #12292
Conversation
|
@codex review |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f5f06c81f
ℹ️ 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".
| "check": "Writes to /tmp and executes (staged dropper)", | ||
| "severity": "CRITICAL", | ||
| "evidence": "L1768: r\"/tmp/\\S+.*(?:subprocess|os\\.system|os\\.popen|Popen|chmod.*\\+x)\", | L1768: r\"/tmp/\\S+.*(?:subprocess|os\\.system|os\\.popen|Popen|chmod.*\\+x)\", sha256:8f6aa9a429370960eeaa339f9cbbc6069dfda34e6a9dc8e7c64689a74a42cf1a", | ||
| "evidence_hash": "2e35147c040613a5f7e8bdf6b4595b5a5ff1c7530425963f18f9b3f79a78d5f4" |
There was a problem hiding this comment.
Pin the converter approvals to the reviewed file
Add the reviewed 2026.9.8 file_sha256 to this entry and the four new combined converter findings below. Without it, _load_baseline treats each entry as unpinned and suppresses the same evidence for any future contents of converter_scan.py; because the evidence consists of benign detector-table regex literals rather than the surrounding behavior, a later unsloth_zoo release can retain those strings while changing the file maliciously, and the floating unsloth_zoo>=2026.9.8 audit will remain green. The earlier converter approvals are digest-pinned for this reason.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed. Pinned in 7782139: the six new entries (the moved /tmp detector line, the four new converter_scan.py checks and the granitemoehybrid.py exec) now carry the 2026.9.8 file digest. Setting a wrong digest on the granitemoehybrid entry reopens the finding and fails the scan.
| "check": "Advanced obfuscation (marshal/compile/zlib) + exec/eval", | ||
| "severity": "HIGH", | ||
| "evidence": "Obfusc: L73: exec(compile(source, f\"<unsloth granitemoehybrid float16 {module.__name__}>\", \"exec\"), namespace)\nExec: L73: exec(compile(source, f\"<unsloth granitemoehybrid float16 {module.__name__}>\", \"exec\"), namespace)", | ||
| "evidence_hash": "5daea207e575087c8cefc30b8d2d947a88640b3be52de1de592d365ab74e978f" |
There was a problem hiding this comment.
Pin the dynamic-exec approval to the reviewed file
Add the reviewed file digest here. This evidence records only the unchanged exec(compile(source, ...)) statement, while its benignity depends on surrounding code obtaining source from inspect.getsource and applying only the reviewed rewrite; with no file_sha256, a future floating zoo release can change where source comes from without changing this evidence, causing the HIGH finding to remain suppressed for arbitrary new file contents.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed. Pinned in 7782139: the six new entries (the moved /tmp detector line, the four new converter_scan.py checks and the granitemoehybrid.py exec) now carry the 2026.9.8 file digest. Setting a wrong digest on the granitemoehybrid entry reopens the finding and fails the scan.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f5f06c81f
ℹ️ 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".
| "check": "Writes to /tmp and executes (staged dropper)", | ||
| "severity": "CRITICAL", | ||
| "evidence": "L1768: r\"/tmp/\\S+.*(?:subprocess|os\\.system|os\\.popen|Popen|chmod.*\\+x)\", | L1768: r\"/tmp/\\S+.*(?:subprocess|os\\.system|os\\.popen|Popen|chmod.*\\+x)\", sha256:8f6aa9a429370960eeaa339f9cbbc6069dfda34e6a9dc8e7c64689a74a42cf1a", | ||
| "evidence_hash": "2e35147c040613a5f7e8bdf6b4595b5a5ff1c7530425963f18f9b3f79a78d5f4" |
There was a problem hiding this comment.
Pin the converter approvals to the reviewed file
Add the reviewed 2026.9.8 file_sha256 to this entry and the four new combined converter findings below. Without it, _load_baseline treats each entry as unpinned and suppresses the same evidence for any future contents of converter_scan.py; because the evidence consists of benign detector-table regex literals rather than the surrounding behavior, a later unsloth_zoo release can retain those strings while changing the file maliciously, and the floating unsloth_zoo>=2026.9.8 audit will remain green. The earlier converter approvals are digest-pinned for this reason.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed. Pinned in 7782139: the six new entries (the moved /tmp detector line, the four new converter_scan.py checks and the granitemoehybrid.py exec) now carry the 2026.9.8 file digest. Setting a wrong digest on the granitemoehybrid entry reopens the finding and fails the scan.
| "check": "Advanced obfuscation (marshal/compile/zlib) + exec/eval", | ||
| "severity": "HIGH", | ||
| "evidence": "Obfusc: L73: exec(compile(source, f\"<unsloth granitemoehybrid float16 {module.__name__}>\", \"exec\"), namespace)\nExec: L73: exec(compile(source, f\"<unsloth granitemoehybrid float16 {module.__name__}>\", \"exec\"), namespace)", | ||
| "evidence_hash": "5daea207e575087c8cefc30b8d2d947a88640b3be52de1de592d365ab74e978f" |
There was a problem hiding this comment.
Pin the dynamic-exec approval to the reviewed file
Add the reviewed file digest here. This evidence records only the unchanged exec(compile(source, ...)) statement, while its benignity depends on surrounding code obtaining source from inspect.getsource and applying only the reviewed rewrite; with no file_sha256, a future floating zoo release can change where source comes from without changing this evidence, causing the HIGH finding to remain suppressed for arbitrary new file contents.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed. Pinned in 7782139: the six new entries (the moved /tmp detector line, the four new converter_scan.py checks and the granitemoehybrid.py exec) now carry the 2026.9.8 file digest. Setting a wrong digest on the granitemoehybrid entry reopens the finding and fails the scan.
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! 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". |
Summary
pip scan-packages :: hf-stackhas been red on main and on every PR since unsloth-zoo 2026.9.8 reached PyPI (2026-09-28 14:04 UTC). The scanner reports 13 unsloth-zoo findings that the baseline does not cover:converter_scan.pyand one intemporary_patches/granitemoehybrid.py.This PR adds 13 baseline entries for them after review. No existing entry is changed or removed, so older zoo versions stay covered.
Review
Provenance. The 2026.9.8 wheel matches unsloth-zoo
mainatf980552abyte for byte, apart from CRLF line endings. There are no.pthfiles, and the only non-Python file is the existingdiffusion_studio/canvas_player.html. Everything flagged is merged source.Files behind the reopened pins. I diffed each file against 2026.9.7 and grepped the added lines for network, subprocess, exec, encoding,
/tmp, environment and metadata patterns:compiler.pymlx/loader.pytemporary_patches/moe_utils.pyUNSLOTH_MOE_*env switchesvision_utils.pyvllm_utils.pyNone adds a destination, a subprocess or a new exec.
converter_scan.py. This is zoo's own model-converter security scanner, so all six hits are regex strings in its detector tables:/tmpdropper pattern, now at L1768 (same code, moved);It never makes a network call itself.
granitemoehybrid.pyL73.exec(compile(...))of a rewritten copy of transformers' ownGraniteMoeHybridDecoderLayer.forward. The source comes frominspect.getsource, with only a regex substitution applied. It is the same patching pattern as the other reviewed zoo sites.Entries were generated with
--write-baselineagainst the current baseline, so the file pins carried over and are set on the 7 re-reviewed entries.Testing
python scripts/scan_packages.py unsloth-zoo==2026.9.8: exit 1 on main, exit 0 here (8 MEDIUM remain, as before).python scripts/scan_packages.py unsloth-zoo==2026.9.7: still exit 0.tests/security/test_scan_packages.py tests/studio/install/test_diffusers_pin.py: 183 passed.