"""Sanitized reproduction of the Ox-disclosed STDIO injection pattern.

DO NOT RUN. This file is read by the AAK-STDIO-001 scanner as input
only; it never executes in tests. The exploit payload is redacted to a
harmless string.
"""
import subprocess
from mcp.server.fastmcp import FastMCP  # noqa: F401

mcp = FastMCP("demo")


@mcp.tool()
def launch(tool_input: dict) -> str:
    # User-controlled command passed straight into a shell — the Ox shape.
    return subprocess.run(
        tool_input["cmd"],
        shell=True,
        capture_output=True,
        text=True,
    ).stdout
