Repository navigation
Studio: vendor shadcn's tailwind.css instead of installing the shadcn CLI - #15635
Merged
Merged
Conversation
This was referenced Oct 28, 2026
danielhanchen
added a commit
that referenced
this pull request
Oct 28, 2026
## 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.
Member
Author
|
@codex review |
1 similar comment
Member
Author
|
@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. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
danielhanchen
marked this pull request as ready for review
October 28, 2026 07:10
danielhanchen
added a commit
that referenced
this pull request
Oct 28, 2026
…e CLI; keep only zod 4.6.7
This was referenced Oct 28, 2026
danielhanchen
added a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 28, 2026
) Bumps `zod` 4.4.3 -> 4.6.7 in `studio/frontend/package-lock.json` (transitive, via `@assistant-ui/react` and `eslint-plugin-react-hooks`). Closes GHSA-mrhx (high). Narrowed from the Dependabot group (the same pair was proposed in unslothai#15636, which Dependabot closed after main dropped the shadcn CLI): - **shadcn**: unslothai#15635 removed the shadcn CLI and vendored its `tailwind.css`, which also removed the CLI's dependency tree (body-parser, hono, qs, fast-uri, ...) and their advisories. - **katex**: stays on 0.16.47. katex 0.18 renamed 20 CSS classes (`.base`, `.strut`, `.sizing`, `.tag`, ...) that the 0.16 renderers used by rehype-katex, @streamdown/math, mermaid and micromark-extension-math still emit, so math would lose its styles. 0.18 also does not close the katex advisory. zod 4.6.7 was published 2026-10-12, so it passes `.npmrc`'s `min-release-age=7`; the lockfile integrity matches the registry. ## Checks (current main vs this branch) - `npm ci`, `npm run build`: pass on both. - Built `dist/`: same file set, every file byte-identical. - `npm test`: 14332 passed on both; the same single test (`text and lines head away from whatever they are drawn on`) fails on main and here. - `npm audit`: 10 (2 high, 8 low) -> 9 (1 high, 8 low). The remaining high is node-forge GHSA-86w9 (its fix, 1.4.2, is a day old); the lows are the katex chain with no 0.16.x fix. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel Han <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
shadcnis a runtime dependency of the Studio frontend only for one stylesheet:src/index.cssdoes@import "shadcn/tailwind.css", which resolves to the package's 1.7 KBdist/tailwind.css(Tailwind@themekeyframes,@custom-variants and one utility). The package itself is the shadcn CLI, so everynpm ciof the frontend (CI,studio/setup.shsource installs, developers) installs it and its dependency tree: 272 packages and about 73 MB ofnode_modules, roughly a quarter of the frontend's installed packages.What changes
studio/frontend/src/shadcn-tailwind.css: shadcn 4.7.0'sdist/tailwind.css(the version the lockfile pins), byte for byte below a header carrying its MIT notice.src/index.cssimports./shadcn-tailwind.cssinstead ofshadcn/tailwind.css.tests/sidebar-inset-selectors.test.tsreads the vendored file instead of resolving it from the package.npm uninstall shadcn.components.jsonstays, sonpx shadcn@latest add ...still works for adding components.Results
npm cinode_modulesdist/The lockfile only loses entries: no remaining package changes version or path. The added lines are
"dev": trueflags on packages that were previously also reachable fromshadcnand are now only pulled in by dev dependencies.Tests
scripts/check_frontend_dep_removal.py --base origin/main --enumerate-dead(the CI dependency-removal gate): passes, "all removed packages are safe to drop".tests/studio/test_frontend_dep_removal.py: 14/14 cases pass.Not covered
shadcnrelease could change itstailwind.css; with the file vendored, picking that up is a manual copy. The file has not changed in substance across the 4.x releases the lockfile has used.