Files
ruflo/v3/docs
ruv 6adbb393e8 fix(browser): never pass tool-supplied text through a Windows shell (ADR-401)
The npx fallback in execBrowserCommand set shell: process.platform === 'win32'
so cmd.exe could resolve npx.cmd. Its safety comment assumed hard-coded
arguments, but fill values, eval scripts and selectors now flow through it, so
on Windows hosts without a global agent-browser those values were shell syntax.

Resolve the npm shims to the process behind them (native .exe or node <entry>,
and node <npm>/bin/npx-cli.js for the fallback) and spawn with an argv array.
.cmd and .bat targets are refused, bin paths that escape the package are
rejected, and an unresolvable launcher reports the install hint instead of
falling back to a shell. POSIX behaviour is unchanged.

Tests fail on the previous implementation; a static guard fails if a shell
option is reintroduced.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-09-26 18:48:20 -04:00
..