subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 使用 ClawHub CLI 安装 try: log_info("调用 ClawHub CLI 安装...") result = subprocess.run( ['npx', 'clawhub', 'install', skill_name], cwd=str(skills_dir), timeout=120- Confidence
- 85% confidence
- Finding
- The script passes user-controlled input `skill_name` to an external package manager-style CLI that downloads and installs remote content. Although `subprocess.run` is used safely with a list (so classic shell injection is avoided), this still creates a supply-chain risk because arbitrary remote skills can be installed based on untrusted input with no allowlist, signature verification, or provenance checks. In the skill marketplace context, installation of a malicious skill could lead to execution of attacker-controlled code or persistence in the user's workspace.
