unsloth/scripts
Daniel Han 4f79a76397 Studio: only block allowlist additions that self-approve a new postinstall
Codex P1: the previous head-only rejection refused EVERY new entry,
making the documented "land the allowlist delta on main first"
workflow unreachable via PR. Any PR that proposed a new trusted
entry was permanently red.

The threat the gate is meant to catch is narrow: a single PR that
adds a new install-script dependency AND allowlists it in the same
diff, so the dep can ship without being eyeballed. Allowlist
additions that do NOT match any new install-script finding in this
PR's lockfile diff are harmless on their own -- they just prepare
the trust list. A follow-up PR that actually adds the dep then
sees the trusted entry on base and passes normally.

Narrow the check accordingly:

  self_approving = head_only_entries & current_install_script_findings
  if self_approving: FAIL

Existing protections remain:
  * head_only entries that DO match a current finding still fail
    (the self-approval bypass).
  * head DROPPING base entries still fails (closes the
    delete-then-bootstrap exploit).
  * Bootstrap mode (base file missing entirely) still accepts head
    as-is so the very first PR to introduce the file can land.

Sanity-tested: adding an unused entry now passes; dropping a base
entry still fails; bootstrap + esbuild@0.21.5 still passes (this
PR's own CI shape).
2026-05-25 11:32:18 +00:00
..
data CI: scope GITHUB_TOKEN permissions, add MLX CI, unblock ~60 skipped tests (#5312) 2026-05-11 03:19:13 -07:00
check_frontend_dep_removal.py ci: deterministic check for studio/frontend dep removals (#5478) 2026-05-16 05:46:22 -07:00
check_new_install_scripts.py Studio: only block allowlist additions that self-approve a new postinstall 2026-05-25 11:32:18 +00:00
enforce_kwargs_spacing.py security: NOT affected by Mini Shai-Hulud (May-12 wave) -- forward-looking hardening only (#5397) 2026-05-13 04:58:12 -07:00
install_gemma4_mlx.sh security: NOT affected by Mini Shai-Hulud (May-12 wave) -- forward-looking hardening only (#5397) 2026-05-13 04:58:12 -07:00
install_qwen3_6_mlx.sh security: NOT affected by Mini Shai-Hulud (May-12 wave) -- forward-looking hardening only (#5397) 2026-05-13 04:58:12 -07:00
lint_workflow_triggers.py security: NOT affected by Mini Shai-Hulud (May-12 wave) -- forward-looking hardening only (#5397) 2026-05-13 04:58:12 -07:00
lockfile_supply_chain_audit.py ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
notebook_to_python.py security: NOT affected by Mini Shai-Hulud (May-12 wave) -- forward-looking hardening only (#5397) 2026-05-13 04:58:12 -07:00
notebook_validator.py security: NOT affected by Mini Shai-Hulud (May-12 wave) -- forward-looking hardening only (#5397) 2026-05-13 04:58:12 -07:00
run_ruff_format.py Formatting & bug fixes (#3563) 2025-11-07 06:00:22 -08:00
scan_npm_packages.py security: NOT affected by Mini Shai-Hulud (May-12 wave) -- forward-looking hardening only (#5397) 2026-05-13 04:58:12 -07:00
scan_packages.py security: NOT affected by Mini Shai-Hulud (May-12 wave) -- forward-looking hardening only (#5397) 2026-05-13 04:58:12 -07:00
stamp_studio_release.py security: NOT affected by Mini Shai-Hulud (May-12 wave) -- forward-looking hardening only (#5397) 2026-05-13 04:58:12 -07:00
uninstall.ps1 Move uninstall scripts into scripts/ and fix references (#5644) 2026-05-20 04:42:03 -07:00
uninstall.sh Move uninstall scripts into scripts/ and fix references (#5644) 2026-05-20 04:42:03 -07:00
verify_comment_only_diff.py studio: drop unused max_grad_value schema + route plumbing (#5424) 2026-05-14 05:43:58 -07:00