Highlights
Command Injection: 2 prior fixes. Scrutinize any change in this area.
packages/playground/src/server.ts: most-fixed (2 issues). Treat as high-risk during review.
3 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Command Injection: The system previously executed shell-evaluated osascript commands via execSync without escaping payload parameters, allowing arbitrary shell command execution via keystroke payloads. Secure practices demand the strict use of execFileSync with a structured argument list.
Command Injection: Parameters passed directly into hdc command execution scripts permitted command injection. Any interface running system automation commands must sanitize and escape all arguments (such as URIs) before string interpolation.
Path Traversal: The playground server resolved file paths from client-supplied UUIDs without restricting the resolution path to the designated temporary directory. This allowed reading arbitrary host files via directory traversal sequences.