mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-04 23:00:20 +00:00
fix(security): escape single quotes in standard SSH enter-agent path (#1902)
The standard SSH path in cmdEnterAgent() interpolated remoteCmd into a single-quoted bash -lc wrapper without escaping embedded single quotes. If launch_cmd (from history.json) or the manifest's launch/pre_launch fields contained a single quote, the shell quoting would break, allowing unintended command execution on the remote server. The Fly.io path already had this escaping (PR #1880, #1893) but the generic SSH fallback did not. This adds the same replace(/'/g, "'\\''") pattern used everywhere else in the codebase. Agent: security-auditor Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c55b78235c
commit
9e309f1ff5
2 changed files with 4 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.10.8",
|
||||
"version": "0.10.9",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue