T09 · Insecure Skill Coding Practices
- Location
scripts/audio/play_http.py:14- Finding
Shell Command Injection Through an Untrusted Audio URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent XGO robot controller, but it includes unsafe shell execution and under-disclosed privileged hardware commands that need review before installation.
Install only after review or remediation. The core robot-control purpose is clear, but users should avoid untrusted URLs, filenames, and target text, should expect camera/audio data to be sent to DashScope for AI features, and should remove shell=True/os.system patterns and sudo-backed helper calls before using this on a real robot.
scripts/audio/play_http.py:14Shell Command Injection Through an Untrusted Audio URL
scripts/audio/play.py:13Shell Command Injection and Path Traversal Through Local Audio Filename
scripts/combo/ai_find_step.py:88Shell Command Injection Through Target-Derived Speech Text
scripts/ai/text_to_speech.py:61Command Injection Through a Network-Provided Text-to-Speech Audio URL
lib/edulib.py:419Unsafe Shell-Backed Media and Recording Methods in the Shared Library
lib/edulib.py:194Implicit Privileged GPIO Operations Violate Least Privilege
There is a direct tainted data flow from requests.post response content to subprocess.run, creating a classic remote-to-code-execution path. Because this runs on a robot control platform, successful exploitation could allow arbitrary commands on the host and potentially affect attached hardware or broader system trust.
edu.lcd_clear()
edu.lcd_text(5, 5, "播放中...", "GREEN", 14)
subprocess.run(f'mplayer -really-quiet "{audio_url}"', shell=True, check=True)
print(f"语音合成完成: {args.text}")
print(f"音色: {args.voice} ({VOICE_OPTIONS.get(args.voice, '')})")
else:
The activation text is extremely broad, covering generic terms like movement, camera, AI, speech, and detection, which can cause the skill to trigger in many unrelated conversations. Because this skill has shell, network, sensing, and physical actuation implications, overbroad routing materially raises the chance of accidental invocation and unsafe real-world actions.
Referenced artifact was not completely inspected
| `take_photo.py` | 拍照 | `--filename photo.jpg` | 照片已保存: {path} |
Referenced artifact was not completely inspected
| `camera_preview.py` | 摄像头预览 | `--duration 10` | 预览窗口显示 |
Referenced artifact was not completely inspected
| `face_detect.py` | 人脸检测 | `--continuous` (持续模式) | 检测到人脸: x=, y=, w=, h= 或 未检测到人脸 |
Referenced artifact was not completely inspected
| `face_count.py` | 人脸计数 | 无 | 共检测到 N 张人脸 + 每张人脸位置 |
Referenced artifact was not completely inspected
| `gesture_detect.py` | 手势识别 | `--continuous` | 识别到手势: {手势} 位置=({x},{y}) 或 无 |
Referenced artifact was not completely inspected
| `color_detect.py` | 颜色识别 | `--color R` (R/G/B/Y) `--continuous` | 检测到{颜色}: 位置=({x},{y}), 半径={r} |
Referenced artifact was not completely inspected
| `line_detect.py` | 巡线检测 | `--color K` (K黑/W白/R/G/B/Y) `--continuous` | 巡线: x={x}, angle={角度} |
Referenced artifact was not completely inspected
| `qr_scan.py` | 二维码扫描 | `--continuous` | 二维码内容: {内容} 或 无 |
Referenced artifact was not completely inspected
| `yolo_detect.py` | 目标检测 | `--continuous` | 检测到: {类别} 位置=({x},{y}) 或 无 |
Referenced artifact was not completely inspected
| `emotion_detect.py` | 情绪识别 | `--continuous` | 情绪: {情绪} 位置=({x},{y}) 或 无 |
Referenced artifact was not completely inspected
| `find_ball.py` | 寻找小球 | `--color R` `--timeout 30` | ✓ 找到{颜色}色小球 或 ✗ 超时未找到 |
Referenced artifact was not completely inspected
| `find_person.py` | 寻找人类 | `--timeout 45` | ✓ 找到人类 或 ✗ 超时未找到 |
Referenced artifact was not completely inspected
| `catch_ball.py` | 抓取小球 | `--color R` `--timeout 60` | ✓ 抓取成功 或 ✗ 抓取失败 |
Referenced artifact was not completely inspected
| `read_imu.py` | 读取IMU | `--axis all` (roll/pitch/yaw/all) |
Referenced artifact was not completely inspected
| `read_motor.py` | 读取舵机角度 | 所有舵机当前角度 |
Referenced artifact was not completely inspected
| `move.py` | 前后移动 | `--speed 0.5` `--runtime 3` |
Referenced artifact was not completely inspected
| `roll.py` | Roll姿态 | `--angle 10` |
Referenced artifact was not completely inspected
| `height.py` | 身高调整 | `--height 90` |
Referenced artifact was not completely inspected
| `reset_odom.py` | 重置里程计 | 无参数 |
Referenced artifact was not completely inspected
| `balance_roll.py` | Roll自平衡 | `--mode 1` (0=关, 1=开) |
Referenced artifact was not completely inspected
| `perform.py` | 表演模式 | `--mode 1` (0=关, 1=开) |
Referenced artifact was not completely inspected
| `calibration.py` | 软件标定 | `--state start/end` |
Referenced artifact was not completely inspected
| `periodic_roll.py` | 周期Roll | `--period 1.5` `--duration 5` |