subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
else: return {"success": False, "data": None, "error": f"不支持的shell类型: {shell}"} result = subprocess.run( cmd, capture_output=True, text=True,- Confidence
- 94% confidence
- Finding
- This function provides direct execution of caller-supplied PowerShell/CMD commands, which is inherently dangerous in a remote PC-control skill because it enables arbitrary OS command execution on the host. Even though check_shell_command() is called, this module is explicitly designed to run powerful system commands, so any weakness or bypass in that validation becomes a high-impact remote code execution path.
