subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
claude_parts += args.extra launch = f"cd {shlex.quote(cwd)} && " + " ".join(shlex.quote(p) for p in claude_parts) subprocess.check_call(tmux_cmd(socket_path, "send-keys", "-t", target, "-l", "--", launch)) subprocess.check_call(tmux_cmd(socket_path, "send-keys", "-t", target, "Enter")) # Workspace trust prompt (first run in a new folder).- Confidence
- 94% confidence
- Finding
- This sends a constructed shell command into an interactive tmux shell, where it will be interpreted by the shell inside the pane. Although cwd and claude arguments are shell-quoted, this still launches a powerful external CLI with user-controlled flags such as --append-system-prompt, --system-prompt, --allowedTools, and extra args, which can weaken safety boundaries and trigger dangerous downstream actions in an agent-execution context.
