subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
print() try: result = subprocess.run( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True,- Confidence
- 98% confidence
- Finding
- The code invokes subprocess.run with shell=True on a command string assembled from user-influenced values such as stock identifier-derived fields and report type. This enables shell metacharacter injection if any mapped name, identifier, or future input source contains characters interpreted by the shell, leading to arbitrary command execution in the agent environment.
