subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run(cmd, timeout=60): result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout) if result.returncode != 0: print(f"ERROR: {cmd}\n{result.stderr}", file=sys.stderr) sys.exit(1)- Confidence
- 98% confidence
- Finding
- The helper `run()` executes arbitrary shell strings with `shell=True`, and it is later fed commands containing file paths and derived values. This creates command-injection risk if any interpolated value contains shell metacharacters, and it broadens the attack surface beyond the skill's stated video-processing purpose.
