subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 构造执行命令 cmd = [VENV_PYTHON, script_path] + args # 执行命令,超时2分钟,避免卡死 result = subprocess.run( cmd, capture_output=True, text=True,- Confidence
- 93% confidence
- Finding
- The code launches another Python script via subprocess using user-controlled arguments and a path derived from task selection. Although it avoids shell=True, it still grants the caller the ability to trigger execution of local scripts, which is a real security-relevant capability in an agent skill because the delegated script may perform sensitive actions. The skill context makes this more dangerous because the runner is explicitly designed to dispatch operational trading modules, including trade execution, so subprocess invocation can have real side effects.
