subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
Never raises — exceptions are caught and returned as an error string. """ try: result = subprocess.run( cmd, shell=True, capture_output=True,- Confidence
- 99% confidence
- Finding
- The diagnostic helper executes shell commands with shell=True, which makes command strings subject to shell metacharacter parsing and injection if any portion becomes attacker-controlled. In this skill, commands may be influenced by alert-derived values such as service names and can also be triggered automatically, increasing the chance of unsafe command execution on monitored hosts.
