mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-07 09:10:55 +00:00
Add input validation for SSH connection parameters (IP, username, server_name) and server identifiers used in delete operations. This prevents command injection attacks if ~/.spawn/history.json is corrupted or tampered with. Changes: - Add validateConnectionIP() - validates IPv4/IPv6 addresses and sentinels - Add validateUsername() - validates Unix username format - Add validateServerIdentifier() - validates server names/IDs - Update cmdConnect() to validate all connection params before use - Update buildDeleteScript() to validate server IDs before interpolation - Update mergeLastConnection() to validate data from bash scripts - Add comprehensive test coverage for all validation functions - Bump CLI version to 0.3.3 (security patch) Security impact: - Prevents HIGH severity command injection via history.ip/user (issue #1381) - Prevents MEDIUM severity command injection via server_id (issue #1380) Agent: security-auditor Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
22 lines
532 B
JSON
22 lines
532 B
JSON
{
|
|
"name": "@openrouter/spawn",
|
|
"version": "0.3.3",
|
|
"type": "module",
|
|
"bin": {
|
|
"spawn": "cli.js"
|
|
},
|
|
"scripts": {
|
|
"dev": "bun run src/index.ts",
|
|
"build": "bun build src/index.ts --outfile cli.js --target bun --minify --packages bundle",
|
|
"compile": "bun build src/index.ts --compile --outfile spawn",
|
|
"test": "bun test",
|
|
"test:watch": "bun test --watch"
|
|
},
|
|
"dependencies": {
|
|
"@clack/prompts": "^1.0.0",
|
|
"picocolors": "^1.1.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "^1.3.8"
|
|
}
|
|
}
|