Skip to content

Scan baseline: re-review torch 2.15.0, botocore 1.43.122 and unsloth-zoo 2026.10.10 - #16114

Merged
danielhanchen merged 2 commits into
mainfrom
scan-baseline-torch-2-15
Oct 30, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
scan-baseline-torch-2-15

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

pip scan-packages :: studio (and :: extras) now fails on every PR whose closure resolves torch 2.15.0 (released 2026-10-28) or botocore 1.43.122 (released 2026-10-29), and pip scan-packages :: hf-stack on every PR that resolves unsloth-zoo 2026.10.10 (released 2026-10-28). Examples are #16109 and #15994 in staging:

Summary: 1 CRITICAL, 4 HIGH
  HIGH      torch  torch/_inductor/compile_worker/subproc_pool.py   same matched code, file digest outside the pin
  HIGH      torch  torch/_inductor/standalone_compile.py            same matched code, file digest outside the pin
  HIGH      torch  torch/_precompile.py                             1 matched line(s) appended to a reviewed file
  CRITICAL  torch  torch/testing/_internal/common_utils.py          the flagged code was rewritten
  HIGH      torch  torch/_vendor/quack/epilogue/library.py          (new site)
  CRITICAL  botocore  botocore/httpsession.py                       the flagged code was rewritten

I read each site in the shipped file. For torch I checked the v2.15.0 sources against the wheel's pinned file digests, and for botocore I read the 1.43.122 wheel.

Site What the scanner matched Verdict
torch/_inductor/compile_worker/subproc_pool.py time.sleep(3600) and subprocess.Popen( of the compile workers, byte-identical to the reviewed entry. Only the lines moved, so the pinned file digest changed. benign, new pin
torch/_inductor/standalone_compile.py exec(compile(python_code, "<compile_to_python>", "exec"), namespace), identical to the reviewed entry and one line lower. benign, new pin
torch/_precompile.py The same exec(compile(python_code, "<precompile>", "exec"), module_ns), plus one more commented usage example # exec(open("this_file.py").read(), ns). benign
torch/testing/_internal/common_utils.py The DOTALL reverse-shell pattern spans the file from import socket on L32, so any edit moves its digest; every torch release has had its own entry. The only socket use is find_free_port, which binds localhost:0 and returns the port. "connect" appears only in error strings, and there is no dup2, pty.spawn, /bin/sh or webbrowser. benign
torch/_vendor/quack/epilogue/library.py (new) _gen_epi_fn compiles and execs a generated epilogue def. params and body are fixed fragments chosen by boolean flags, and activation is only a key into a fixed map. The file documents the reason: the generated signature lets absent operands compile out of the kernel. Nothing external reaches the source. benign
unsloth-zoo compiler.py One matched line was added: compile(looped, "<peft lora forward>", "exec") in _patch_lora_update. It checks that PEFT's own forward source still parses after a string replacement, then falls back if it does not. The code object is discarded and nothing is executed. The other matched lines are unchanged. benign
unsloth-zoo llama_cpp.py, mlx/loader.py, mlx/speculative.py, temporary_patches/moe_utils.py, vllm_utils.py Byte-identical matched code. Only the pinned file digest moved. benign, new pins
botocore/httpsession.py The env read is the opt-in SSLKEYLOGFILE TLS key log. The conn.urlopen(...) call gained enforce_content_length=False and an optional per-request timeout through extra_kwargs. benign

Change

I added the new entries (six for torch and botocore, six for unsloth-zoo) next to the existing ones for each file and removed nothing. The earlier entries stay, so shards that still resolve older torch and botocore are unaffected. I did not regenerate with --write-baseline: it writes only what the current scan sees, so a partial scan would have dropped every other package's entries. The pinned sites keep pins (file_sha256) at their new file digests.

dnspython 2.9.1 also showed up in one run, but it scans clean on its own against this baseline, so it needs no entry.

Verification

  • scripts/scan_packages.py torch==2.15.0: on main 1 CRITICAL, 4 HIGH with exit 1, the same result as the CI runs. On this branch it exits 0.
  • scripts/scan_packages.py botocore==1.43.122: on main 1 CRITICAL with exit 1. On this branch it exits 0.
  • scripts/scan_packages.py unsloth-zoo==2026.10.10: on main 1 CRITICAL, 5 HIGH (the CI hf-stack result). On this branch it exits 0.
  • The tests that read the scanner or its baseline: 638 passed.

torch 2.15.0 (2026-10-28) and botocore 1.43.122 (2026-10-29) reopened six sites in the
studio scan shard: four reviewed torch sites moved or gained a matched line, torch vendors a
new quack epilogue code generator, and botocore rewrote the urlopen call in httpsession.py.
Each was read in the shipped file and is benign; entries added, none removed.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-10-30T12:25:51.861474Z 13405e5 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. Bravo.

Reviewed commit: b54dfb177e

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

Five keep byte-identical matched code under a moved file digest. compiler.py gained one
matched line, compile(looped, "<peft lora forward>", "exec") in _patch_lora_update, a
syntax check of PEFT's own forward after a string replace whose code object is discarded.
@danielhanchen danielhanchen changed the title Scan baseline: re-review torch 2.15.0 and botocore 1.43.122 Scan baseline: re-review torch 2.15.0, botocore 1.43.122 and unsloth-zoo 2026.10.10 Oct 30, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 13405e5af7

ℹ️ 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 7977cc1 into main Oct 30, 2026
0 of 24 checks passed
@danielhanchen
danielhanchen deleted the scan-baseline-torch-2-15 branch October 30, 2026 12:55
danielhanchen added a commit that referenced this pull request Oct 30, 2026
…6123)

`Repo tests (CPU, rest-2)` is red on main since #16106 (prepare decision
datasets faster, in less memory, with row progress). It fails on
unrelated PRs, for example #16114:

```
tests/test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding[14]
AssertionError: 1 file reads in the test trees touch a checked-in file with the platform default encoding ...
  'studio/backend/tests/test_decision_dataset_prefetch.py:298: read_text()'
```

`_frontend_regex` reads
`studio/frontend/src/features/studio/preparation-progress.ts` with
`read_text()`. On Windows that decodes as cp1252 and breaks as soon as
the file gains a non-ASCII byte. The guard is right and the test was
wrong, so this adds `encoding = "utf-8"`. This is the same fix #16025
made for #15996.

## Verification

- `tests/test_source_read_encoding.py`: fails on main on the line above.
16 passed here.
- `studio/backend/tests/test_decision_dataset_prefetch.py`: 11 passed.
danielhanchen added a commit that referenced this pull request Oct 31, 2026
#16264)

`pip scan-packages :: hf-stack` now fails on PRs whose closure resolves
unsloth-zoo 2026.10.11, for example #16258:

```
Summary: 5 CRITICAL, 7 HIGH, 172 MEDIUM
  12 of the 184 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/device_type.py           same matched code, file digest outside the pin
    ...
```

All twelve are the same kind: the scanner's matched code is
byte-identical to a reviewed entry (the same `evidence_hash`), and only
the pinned `file_sha256` moved because other lines in the file changed
in the release.

| File | Check | Reviewed `evidence_hash` matches |
|---|---|---|
| `unsloth_zoo/device_type.py` | env + network | yes |
| `unsloth_zoo/llama_cpp.py` | env + network | yes |
| `unsloth_zoo/triton_kernels_compat.py` | downloads and executes remote
code | yes |
| `unsloth_zoo/vision_utils.py` | env + network | yes |
| `unsloth_zoo/vision_utils.py` | cloud metadata + network | yes |
| `unsloth_zoo/compiler.py` | obfuscation + exec/eval | yes |
| `unsloth_zoo/vllm_gdn_replayssm.py` | obfuscation + exec/eval | yes |
| `unsloth_zoo/vllm_utils.py` | obfuscation + exec/eval | yes |
| `unsloth_zoo/mlx/decision.py` | obfuscation + exec/eval | yes |
| `unsloth_zoo/mlx/loader.py` | obfuscation + exec/eval | yes |
| `unsloth_zoo/mlx/speculative.py` | obfuscation + exec/eval | yes |
| `unsloth_zoo/temporary_patches/moe_utils.py` | obfuscation + exec/eval
| yes |

## Change

As in #16114, each new entry sits next to the reviewed one it matches,
pinned at the 2026.10.11 file digest. Nothing is removed, so shards that
still resolve older zoo releases are unaffected. I did not regenerate
the whole file with `--write-baseline`, since a single-package scan
would drop every other package's entries. The diff is 108 added lines
and no removed ones.

## Verification

- `scripts/scan_packages.py unsloth-zoo==2026.10.11` on main gives `5
CRITICAL, 7 HIGH` with exit 1, matching the CI hf-stack run. On this
branch it exits 0 (`24 finding(s) suppressed by baseline`, 13 MEDIUM
left).
- The tests that read the scanner or its baseline, under
`tests/security` and the others that import it: 638 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