Repository navigation
Baseline the eight unsloth-zoo 2026.10.1 findings after review - #12884
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: 1c02db953f
ℹ️ 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": "Advanced obfuscation (marshal/compile/zlib) + exec/eval", | ||
| "severity": "HIGH", | ||
| "evidence": "Obfusc: L5202: _mod = __import__(module_name, fromlist=[\"_\"])\nExec: L162: mx.eval(model.parameters()) | L196: mx.eval([v for k, v in tree_flatten(casted) if is_mlx_norm_parameter_path(k)]) | L1440: mx.eval(model.parameters()) | L1441: mx.eval(mx.distributed.all_sum(mx.array(1.0), stream=mx.cpu)) | L1508: mx.eval(model.parameters()) | L1511: mx.eval(mx.distributed.all_sum(mx.array(1.0), stream=mx.cpu)) | L2940: mx.eval(altup.correct(predictions, activated)) | L3412: model.eval() | L3489: mx.eval(baseline, perturbed) | L4850: model.eval() | L5607: mx.eval(model.parameters()) | L5723: mx.eval(module.weight) | L8326: mx.eval(model.parameters()) | L8343: mx.eval(target.parameters()) | L9342: lambda: mx.eval(model.parameters()), | L9406: lambda: mx.eval(model.parameters()), | L9569: mx.eval(model.parameters())", | ||
| "evidence_hash": "d1c32d6d0a0f4625af70ef11ce765a893c07f48e54c21fb8ff5ef43381daf18e" |
There was a problem hiding this comment.
Pin the new MLX baseline entry to the reviewed file
This entry omits file_sha256, unlike the previously reviewed mlx/loader.py revision and the other seven entries added here. _load_baseline therefore records this key as unpinned and _partition_baseline will suppress it for any file digest, so a future unsloth-zoo release that retains these matched eval/import lines while adding or changing a payload elsewhere in the file will pass the security gate without review. Add the digest of the reviewed 2026.10.1 file so unrelated file changes reopen the finding.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Correct. The entry is now pinned to the 2026.10.1 file digest. The cause was in _write_baseline: it only carried a pin over for an unchanged evidence hash, so a pinned site whose matched lines changed was written unpinned. It now keeps any site that was reviewed under a pin pinned, with a test for that, and mlx/loader.py joins the must-be-pinned guard with its four older unpinned variants grandfathered. Both fail when the fix is reverted.
… --write-baseline sees new evidence
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. 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". |
… again (#19245) ## Keep scan_packages.py clear of Bitdefender's Python stealer signature again `scripts/scan_packages.py` on main is flagged again on VirusTotal as `Generic.PY.STEALER.B`, the same detection #12169 fixed in September. Bitdefender, and every engine that ships its signatures, quarantines the file on a contributor's machine. ### What changed Comments only. The comment trim in #12969 shortened several comment blocks near the top of the file; that is what brought the detection back. This restores those comments (the 28 edits above the anti-analysis patterns) and keeps the rest of the trim. The parsed code is identical to main (same `ast.dump`), so behaviour does not change. One line is added above `_joined` noting that trimming the comments there re-triggered it, so the next cleanup rescans the file. ### Evidence (VirusTotal, fresh uploads, 2026-11-24) | Version of `scripts/scan_packages.py` | Detections | |---|---| | After #12169 (Sep 27) and after #12884 (Oct 6) | 0 | | After #12969 (Oct 26) | 8: ALYac, Arcabit, BitDefender, Emsisoft, GData, MicroWorld-eScan, VIPRE `Generic.PY.STEALER.B`; CTX `script.spyware.generic` | | main today (after #16112) | the same 8 | | main with the top 28 comment edits reverted | 0 | | This PR | 0 / 72 (sha256 `29cb47f1b33b57815d75a1a76476c53b068ce452068c8569d10ea2f949b968af`) | Bisecting the 110 comment edits between #12884 and main: applying only edits 55 to 110 stays clean, while several small subsets of edits 0 to 21 each bring the detection back on their own. The detection reacts to how much comment text separates the pattern tables near the top of the file, not to any single word. ### Tests - `tests/security/test_scan_packages.py`, `tests/security/test_lint_av_shapes.py`, `tests/test_scripts_write_lf.py`: 181 passed. - `scripts/lint_av_shapes.py`: 0 new errors. Pre-commit ruff clean. ### Not covered - Engines can change their signatures at any time; this is clean against today's. - Other files were not affected: the installers, setup scripts, uninstallers, `studio/install_*.py` helpers and `scan_npm_packages.py` on main are all 0 detections today.
pip scan-packages :: hf-stackin Security audit went red on main (8435a749be, run 37506595163) once unsloth-zoo 2026.10.1 reached PyPI. All 8 findings are at sites already reviewed inscripts/scan_packages_baseline.json; the release moved them outside their pins:unsloth_zoo/compiler.pyunsloth_zoo/llama_cpp.pyunsloth_zoo/mlx/loader.pyunsloth_zoo/temporary_patches/gpt_oss.pyunsloth_zoo/temporary_patches/moe_utils.pyunsloth_zoo/vision_utils.pyunsloth_zoo/vision_utils.pyunsloth_zoo/vllm_utils.pyReview
mlx/loader.py: compared line by line against the previous entry, every match is the same statement shifted down, except one newmodel.eval()at L3412. Read in the 2026.10.1 wheel, it isnn.Module.eval()switching the model to eval mode inside_mlx_module_state_restoredso dropout does not draw from a seeded RNG. It is not Pythoneval.Change
The 8 entries are appended to
scripts/scan_packages_baseline.jsonwith their 2026.10.1 evidence hash and file digest pins, same as #12515 did for 2026.9.9. All 8 carry a 2026.10.1 file digest, checked against the files in the wheel. No existing entry is modified or removed.Writer fix
_write_baselinecarried afile_sha256pin over only for an unchanged evidence hash.mlx/loader.pyhas been pinned since 2026.9.x, but its new variant has a new evidence hash, so regeneration wrote it unpinned and it would have suppressed the finding for any file contents. The writer now keeps a site (package, file, check) pinned once it has been reviewed under a pin.test_write_baseline_keeps_a_pinned_site_pinned_when_its_evidence_changescovers it, andmlx/loader.pyjoins the must-be-pinned list intest_context_dependent_unsloth_zoo_findings_are_digest_pinnedwith its four older unpinned variants grandfathered. Each test fails with its fix reverted.Verification
python scripts/scan_packages.py -r <unsloth-zoo==2026.10.1>: exit 1 on main with the 8 findings above, exit 0 on this branch with 22 suppressed.tests/security/test_scan_packages.py,tests/security/test_scan_npm_packages.py: 203 passed.