示例把可变 URL 和提示直接放入 shell 单引号,可能造成命令注入
原文依据:2 处命令示例将 JSON 包在 shell 单引号内,却未规定如何安全编码用户提供的 URL 或提示。若代理直接替换这些字段,其中的单引号可提前结束参数,后续 shell 元字符可能被解释为命令。Skill 声称“无 shell 注入面”,但该说法只涉及 CLI 是否展开提示,未解决调用 CLI 之前的 shell 解析。
攻击者控制的视频 URL、提示文本或复制来的内容可能以代理当前权限执行额外命令,进而读取或修改用户可访问的文件和凭据。
该示例要求把含 URL 和提示的 JSON 放进 shell 单引号参数;如果代理用字符串替换方式插入用户值,值中的单引号可能先结束引用,使后续 shell 元字符生效。第149行仅说明 CLI 收到参数后不会展开内容,不能消除 shell 在启动 CLI 前的解析风险。用户可要求作者使用可靠的 JSON/参数编码,并限制代理只传递经过验证、不含控制字符的值。
```bashruncomfy run wan-ai/wan-2-7/edit-video \ --input '{ "video_url": "https://your-cdn.example/vertical-clip.mp4", "prompt": "Extend the canvas to 16:9 horizontal by adding matching environment on the left and right sides. Continue the existing background style, lighting, and camera distance throughout the clip. Preserve the original action and subject framing in the center." }' \ --output-dir ./out```查看另外 1 个位置
- **Token storage**: `runcomfy login` writes the API token to `~/.config/runcomfy/token.json` with mode 0600. Set `RUNCOMFY_TOKEN` env var in CI / containers.- **Input boundary (shell injection)**: prompts and video URLs are passed as a JSON string via `--input`. The CLI does not shell-expand prompt content. **No shell-injection surface**.- **Indirect prompt injection (third-party content)**: source video URLs are **untrusted**. Agent mitigations: