T09 · Insecure Skill Coding Practices
- Location
SKILL.md:18- Finding
Unrestricted API Base URL and Discovery Trust Can Expose Credentials and Enable SSRF
- Content
View full analysis
**。 ## 能力目录(公开,无需 Key) - **GET** `{base}/v1/capabilities` - 查询参数(可选):`type`(如 `ip_evaluation`)、`domain`(领域关键词)。 - 用于发现平台上的能力、匹配供应方或展示给用户。 ## 会话与消息(需 API Key) - 创建会话、发送消息等需在请求头中带 **X-API-Key**。 - 具体端点以 **GET** `{base}/.well-known/a2a.json` 或 **GET** `{base}/openapi.json` 为准;常见为: - 会话创建、消息发送:见 OpenAPI 或 `platform_doc` 页面。 - 若用户已配置 **MCP**(如 `wymyk_create_inquiry`、`wymyk_send_message`),可优先通过 MCP 工具完成会话与发消息;否则使用 REST 或 A2A JSON-RPC(**POST** `{base}/a2a/v1`,方法如 `session/create`、`message/send`)。 ``` ### Technical Analysis The skill accepts `A2A_BASE_URL` from the environment without imposing an HTTPS requirement, hostname allowlist, network-range restrictions, or explicit user approval for non-default origins. It then instructs the agent to construct requests from that base URL and attach the `A2A_API_KEY` through the `X-API-Key` header for authenticated operations. The skill also directs the agent to rely on remote discovery metadata and OpenAPI documentation to determine subsequent endpoints. It does not require discovered URLs to remain on the approved origin, nor does it prohibit cross-origin redirects or forwarding authentication headers after a redirect. Consequently, an attacker who can influence the environment variable, discovery response, DNS resolution, or ...[truncated 1844 chars]- Remediation
View remediation
