T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/authorize.py:34- Finding
Excessive OAuth scopes and unrestricted remote 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 Bilibili thumbnail generation and refinement. It legitimately requires image generation or editing, selected-file upload, artifact access, task tracking, and the ability to pay for approved image work. The authorization request additionally obtains video generation, music generation, speech generation, and voice read/write privileges. These capabilities are not necessary for thumbnail creation. The credential also includes general MCP tool and wallet-spending access. The client compounds this excessive authorization by accepting an arbitrary `tool_name` from the command line and forwarding it ...[truncated 1629 chars]- Remediation
View remediation
