T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/authorize.py:34- Finding
Excessive OAuth scopes combined with unrestricted MCP tool invocation
- Content
View full analysis
dict[str, Any]: session = _session_with_registration( state_dir=Path.home() / ".beatra", post_json=_default_post_json, ) if command == "tools": return session.request(2, "tools/list", {}) try: arguments = json.load(os.sys.stdin) except json.JSONDecodeError as exc: raise RuntimeError("Tool arguments on stdin must be one JSON object") from exc if not isinstance(arguments, dict): raise RuntimeError("Tool arguments on stdin must be one JSON object") assert tool_name is not None return session.request( 2, "tools/call", {"name": tool_name, "arguments": arguments}, ) ``` ```python call = subparsers.add_parser("call", help="Call one tool with a JSON object on stdin") call.add_argument("tool_name") ``` ### Technical Analysis The declared Skill functionality is limited to producing a non-billable product-video plan. Its documentation explicitly states that the package does not render media and creates no paid generation task. Despite that limited purpose, authorization requests permissions for: - Wallet spending - Image, video, music, speech, and voice generation - Artifact creation - Voice modification - Task cancellation - Task and artifact access - General MCP tool access The bundled client then exposes a generic `call` command that accepts any tool name from the command line and forwards arbitrary JSON arguments. Ther ...[truncated 1529 chars]- Remediation
View remediation
` interface with a hardcoded allowlist of approved tool names. 5. Validate each tool's argument schema locally before transmission. 6. Require explicit user confirmation for any operation that can spend funds, create billable tasks, modify remote state, or cancel work. 7. Enforce equivalent restrictions server-side so a modified local client cannot bypass the package's capability boundary. 8. Avoid sharing a highly privileged credential across unrelated Skills. ]]>
