subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
elif system == "Windows": # Windows 使用 clip 命令,需要 utf-16le 编码 proc = subprocess.Popen(['clip'], stdin=subprocess.PIPE, shell=True) proc.communicate(text.encode('utf-16le')) return True- Confidence
- 96% confidence
- Finding
- The Windows clipboard path uses `subprocess.Popen(..., shell=True)`, which unnecessarily routes execution through the shell. Even though the command is currently hardcoded as `clip`, shell execution expands the attack surface and can be influenced by environment or shell-resolution behavior, adding host command execution capability to a publishing skill.
