mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
c67010c92f
The PR author correctly flagged that this gate is an inventory, not a security invariant: --update lets any site self-approve a raw value, and the literal-first array heuristic is blind to indirect argv (a variable-built subcommand, or an argv assembled in a helper). Reproduced: adb(['shell', 'input','text',text]) is inventoried, but const s='shell'; adb([s,'input','text',text]) yields no finding. Shipping it security-framed gives false assurance. Remove it. The sound fix — a typed device-shell execution boundary where a raw string cannot reach adb/hdc shell without being quoted or explicitly marked — is a ~188-site cross-package migration on device execution paths, scoped to a dedicated follow-up PR. The two known-dangerous sites (input text, cmd clipboard set text) already quote through shellQuoteIfNeeded on main, so no regression. This keeps the PR focused on the MCP tool surface. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wb8EuoySL26UsdtCtRj5X8