Skip to content

Scan baseline: triton 3.9 compile warmup pool - #15658

Merged
danielhanchen merged 1 commit into
mainfrom
ci-baseline-triton-39-warmup-pool
Oct 28, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-baseline-triton-39-warmup-pool

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

pip scan-packages :: extras now fails on unrelated PRs (#15634, #15635) with one unbaselined finding:

[1] HIGH  Advanced obfuscation (marshal/compile/zlib) + exec/eval
    Package:  triton
    File:     triton/_compile_warmup_pool.py
    Evidence: Obfusc: L149:  code = compile(jit_function.src, function.__name__, "exec")
    Evidence: Exec: L151:    exec(code, namespace)

triton/_compile_warmup_pool.py is new in triton 3.9.0, which the extras lane now resolves.

Review

Lines 131-156 of that file, in _JITFunctionPickler._reduce_jit_codegen_fn:

  • When triton cloudpickles a @triton.jit function to its compile-warmup process pool and the function's code object name differs from its own name, it recompiles that function's own source (jit_function.src).
  • It runs that source in a scratch namespace built from the function's globals, to discover which globals the pickled function needs.
  • No downloaded or external input reaches compile / exec.

It is the same first-party codegen pattern as the already-baselined triton/runtime/interpreter.py entry, so it is baselined rather than pinned away.

Change

scripts/scan_packages_baseline.json: one entry for (triton, triton/_compile_warmup_pool.py, "Advanced obfuscation (marshal/compile/zlib) + exec/eval") with evidence hash d9e13c23....

  • The entry was generated by scan_packages.py triton==3.9.0 --write-baseline and inserted after the other triton entries.
  • The rest of the file is byte-identical.
  • If the matched code changes, the hash stops matching and the finding reopens.

Testing

  • python scripts/scan_packages.py triton==3.9.0: 1 HIGH, exit 1, on main; exit 0 with this entry (only 3 MEDIUM remain).
  • tests/security/test_scan_packages.py and tests/studio/install/test_diffusers_pin.py: 209 passed.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-28T05:28:36.516055Z cc87197 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. Another round soon, please!

Reviewed commit: cc871971dd

ℹ️ 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 f7c948b into main Oct 28, 2026
0 of 21 checks passed
@danielhanchen
danielhanchen deleted the ci-baseline-triton-39-warmup-pool branch October 28, 2026 05:34
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