subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def recreate(recreate_command: str) -> None: proc = subprocess.run(recreate_command, shell=True, executable="/bin/bash", text=True) if proc.returncode != 0: raise CommandError("recreate_command execution failed")- Confidence
- 99% confidence
- Finding
- The recreate path executes a user-provided string via /bin/bash with shell=True, which allows arbitrary shell metacharacters, command substitution, chaining, redirection, and environment abuse. In a skill intended to recreate Docker containers, this turns a container-management action into unrestricted host command execution.
