subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
""" try: message_json = json.dumps(message, ensure_ascii=False) result = subprocess.run( command, shell=True, input=message_json,- Confidence
- 98% confidence
- Finding
- The script executes a user-supplied callback command with subprocess.run(..., shell=True). Even though message JSON is passed via stdin rather than interpolated into the command string, shell=True still causes shell parsing of the provided command and enables arbitrary command execution if the option is misused or influenced by untrusted configuration. In an agent messaging skill, this is especially dangerous because command execution is directly wired to message arrival events.
