Skip to content

Commit 3f9da2a

Browse files
louisgvclaude
andcommitted
fix(local): show security warning for all local agent installations
Previously the warning only appeared for openclaw. Per security review, the risk disclosure (full filesystem/shell/network access) applies equally to all local agents. Agent: pr-maintainer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent dfc3e62 commit 3f9da2a

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openrouter/spawn",
3-
"version": "0.27.2",
3+
"version": "0.27.3",
44
"type": "module",
55
"bin": {
66
"spawn": "cli.js"

packages/cli/src/local/main.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
import type { CloudOrchestrator } from "../shared/orchestrate.js";
66

7+
import * as p from "@clack/prompts";
78
import { getErrorMessage } from "@openrouter/spawn-shared";
89
import { runOrchestration } from "../shared/orchestrate.js";
10+
import { logWarn } from "../shared/ui.js";
911
import { agents, resolveAgent } from "./agents.js";
1012
import { downloadFile, interactiveSession, runLocal, uploadFile } from "./local.js";
1113

@@ -19,6 +21,25 @@ async function main() {
1921

2022
const agent = resolveAgent(agentName);
2123

24+
// Warn about security implications of installing agents locally
25+
if (process.env.SPAWN_NON_INTERACTIVE !== "1") {
26+
process.stderr.write("\n");
27+
logWarn("⚠ Local installation warning");
28+
logWarn(` This will install ${agent.name} directly on your machine.`);
29+
logWarn(" The agent will have full access to your filesystem, shell, and network.");
30+
logWarn(" For isolation, consider running on a cloud VM instead.\n");
31+
32+
const confirmed = await p.confirm({
33+
message: "Continue with local installation?",
34+
initialValue: true,
35+
});
36+
37+
if (p.isCancel(confirmed) || !confirmed) {
38+
p.log.info("Installation cancelled.");
39+
process.exit(0);
40+
}
41+
}
42+
2243
const cloud: CloudOrchestrator = {
2344
cloudName: "local",
2445
cloudLabel: "local machine",

0 commit comments

Comments
 (0)