T09 · Insecure Skill Coding Practices
- Location
SKILL.md:61- Finding
Shell and Python Injection Through Unsafe Input Interpolation
- Content
View full analysis
--recursive --include "*关键词*" ``` `SKILL.md:78`: ```bash rclone lsl nas:/path/to/file.pdf ``` `SKILL.md:205-207`: ```text 🔍 搜索: rclone lsf nas: --recursive --include "*keyword*" 📏 大小: rclone size nas:/path --json 📥 下载: rclone copy nas:/path /tmp/openclaw/nas-courier/ ``` `references/rclone-ops.md:18-24`: ```bash rclone lsf nas: --recursive --include "*关键词*" # 按扩展名 + 关键词 rclone lsf nas: --recursive --include "*关键词*.pdf" # 按修改时间过滤(最近 N 天) rclone lsf nas: --recursive --include "*关键词*" --max-age 30d ``` `references/rclone-ops.md:30`: ```bash rclone lsl nas:/path/to/file.pdf ``` `references/http-temp-link.md:25-26`: ```bash FILENAME="file.pdf" # 替换为实际文件名 ENCODED=$(python3 -c "import urllib.parse; print(urllib.parse.quote('${FILENAME}'))") ``` ### Technical Analysis The documented commands interpolate user-controlled search terms, share names, paths, and potentially NAS-controlled filenames into shell commands. Several rclone examples do not establish safe argument boundaries around the remote specification. Even where double quotes are shown, double quotes do not neutralize shell command substitution constructs such as `$(...)` or backticks when generated command text is subsequently interpreted by a shell. The HTTP-link procedure introduces an additional injection boundary by embedding `FILENAME` directly into Python source code. A filename containing a single quote can terminate the `urllib.parse.quote()` string literal and append attacker-controlled Python syntax. Because the Python interpreter is launched by the ...[truncated 1320 chars]- Remediation
View remediation
