mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-12 22:40:24 +00:00
Check for ".." path traversal in the raw input BEFORE normalize() strips it, fixing CWE-22 where crafted paths like "/tmp/../../etc/passwd" normalized to "/etc/passwd" and bypassed the post-normalize ".." check. Extracts a shared validateRemotePath() into shared/ssh.ts and replaces the duplicated inline validation in all 5 providers (DigitalOcean, Hetzner, GCP, AWS, Sprite) plus agent-setup.ts. Fixes #2835 Agent: complexity-hunter Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cli | ||
| shared | ||