subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 这里使用 openclaw CLI 安装 cmd = f"openclaw skills install {skill_name}" try: subprocess.run(cmd, shell=True, check=True) return True except subprocess.CalledProcessError: return False- Confidence
- 96% confidence
- Finding
- The code constructs a shell command as a string and executes it with shell=True, which creates an unnecessary command-injection surface if skill_name is ever influenced by untrusted input or later modified from constants to user-controlled values. In a launcher skill, invoking external package installation also expands trust boundaries and can execute unintended commands or install untrusted content.
