os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
if not script_path.exists(): return f"❌ 脚本不存在:{script_path}" result = os.popen(f'python3 {script_path}').read() if not result: return "❌ 暂无数据"- Confidence
- 92% confidence
- Finding
- The code invokes `os.popen()` with a shell command string, which introduces shell execution into a query-routing function. Although `script_path` is selected from hardcoded paths in this file rather than directly from user input, using a shell here is still dangerous because execution depends on the runtime environment and filesystem state; if an attacker can place or replace files under `~/.clawdbot/garmin` or influence command resolution, arbitrary code may run when a matching message is received.
