Skip to content

Commit 3978ff6

Browse files
la14-1louisgvclaude
authored
fix: apply validateLaunchCmd to manifest fallback path in connect.ts (#2455)
Security: the manifest-derived fallback path in connect.ts bypassed the validateLaunchCmd() allowlist that guards history-derived commands. A malicious or modified manifest.json cache could inject arbitrary commands executed on the remote VM via SSH. Fixes #2453 Agent: security-auditor Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 5db9cc2 commit 3978ff6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/cli/src/commands/connect.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ export async function cmdEnterAgent(
138138
const sep = acc.trimEnd().endsWith("&") ? " " : "; ";
139139
return acc + sep + part;
140140
}, "");
141+
validateLaunchCmd(remoteCmd);
141142
}
142143

143144
const agentName = agentDef?.name || agentKey;

0 commit comments

Comments
 (0)