unsloth/studio
danielhanchen 475c06c968 Harden sandbox: aliased open modules, os shell from-imports, subprocess shell cwd, device sink writes
- Recognize an aliased open-module receiver (import builtins as b; b.open(...), import io as i;
  i.open(...), import os as o; o.open(...)) as a read callee via a new _open_mod_aliases set, so
  an aliased traversal / sensitive read is caught like the literal builtins/io/os.open forms.
- Record os shell aliases from `from os import system as s` / popen: the import-walk elif that
  consumed the os module only recorded `open`, so the later shell-alias branch never saw it and
  the read scan skipped s('cat /etc/passwd'). Handle os shell functions in that branch and split
  the subprocess from-import handling into its own branch.
- Combine a subprocess cwd= with a shell payload's relative reads: subprocess.run('cat passwd',
  shell=True, cwd='/etc') is resolved to /etc/passwd (the shared read scanner now takes a cwd
  seed, overridable per-command by env -C), and a NON-literal cwd fails closed for a relative
  reader.
- Allow a Python write to a standard device sink (/dev/null, /dev/stdout, ...) in the runtime
  guard, checked on the requested path (not its realpath, so /dev/stdout is not followed to a
  redirected outside file); benign output-suppression patterns are no longer denied.

Adds TestRound28Bypasses plus runtime device-sink write tests.
2026-07-10 06:09:54 +00:00
..
backend Harden sandbox: aliased open modules, os shell from-imports, subprocess shell cwd, device sink writes 2026-07-10 06:09:54 +00:00
frontend Stabilize floating monitor drag (#6984) 2026-07-09 00:16:05 -07:00
src-tauri Speed up Studio startup path (#6899) 2026-07-07 18:08:07 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
install_llama_prebuilt.py Studio: add Vulkan llama.cpp support (#5819) 2026-07-09 03:39:48 -07:00
install_node_prebuilt.py Pin isolated Node.js installer to committed sha256 digests (#6625) 2026-06-24 05:47:58 -07:00
install_python_stack.py Studio: fix flash-attn and torchao install on Blackwell (sm_100+) GPUs (Closes #6961) (#6970) 2026-07-08 06:38:10 -07:00
LICENSE.AGPL-3.0 Add AGPL-3.0 license to studio folder 2026-03-09 19:36:25 +00:00
node_prebuilt_pins.json Pin isolated Node.js installer to committed sha256 digests (#6625) 2026-06-24 05:47:58 -07:00
package-lock.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
package.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
setup.bat Final cleanup 2026-03-12 18:28:04 +00:00
setup.ps1 Fix Windows installer torch index override (#6972) 2026-07-09 03:46:47 -07:00
setup.sh Studio: source CPU llama.cpp prebuilts from unslothai/llama.cpp (#6311) 2026-07-08 05:34:59 -07:00
Unsloth_Studio_Colab.ipynb Studio Colab: opt-in shareable Cloudflare tunnel link (#6684) 2026-06-26 00:56:23 -07:00