subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run_command(self, cmd: str) -> Tuple[bool, str]: """Run shell command and return success status and output.""" try: result = subprocess.run( cmd, shell=True, capture_output=True,- Confidence
- 97% confidence
- Finding
- The helper executes arbitrary shell strings with shell=True, and several callers interpolate untrusted skill slugs directly into those command strings. If a malicious or malformed slug contains shell metacharacters, it can trigger command injection and execute arbitrary commands in the updater user's context. Because this tool is specifically designed to process externally sourced skill identifiers from ClawHub, the context makes the issue more dangerous, not less.
