subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"SHIPLOOP_DURATION": f"{duration:.0f}", } try: subprocess.run(notify_command, shell=True, env=env, timeout=30) except Exception as e: logging.warning("Notification command failed: %s", e)- Confidence
- 99% confidence
- Finding
- The code executes notify_command with shell=True, which allows arbitrary shell syntax and command chaining. If notify_command comes from an untrusted or loosely controlled config/CLI source, this becomes direct arbitrary command execution in the context of the shiploop process, which is especially dangerous for a pipeline tool likely to run with repository and deployment credentials present.
