T09 · Insecure Skill Coding Practices
- Location
SKILL.md:247- Finding
API Key Exposed Through URL Query Parameter
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 247–265
Vulnerability Type: API credential exposure through a URL query string
Risk Level: HighVulnerable Code
text 端点:GET /voice/callback_find 接口说明:根据订单ID查询预订结果、通话记录、凭证等完整信息。 请求参数: 参数 类型 必填 说明 order_id string 是 订单ID(创建任务返回的order_id) token string 是 API Key(sk-xxx格式) 请求示例: curl -X GET "https://tripnowengine.133.cn/tripnow/v1/voice/callback_find?order_id=RESORD216873707229&token=sk-live-**************************a2aMg" \ -H "Authorization: Bearer sk-your-api-key"Technical Analysis
The documented order-query flow requires the API key in the
tokenquery parameter, even though the same request also uses the standardAuthorization: Bearerheader. Secrets placed in URLs can be recorded in shell history, web-server and reverse-proxy access logs, API gateway telemetry, monitoring systems, and debugging traces.TLS protects the request while it is in transit, but it does not prevent clients, intermediaries, or destination infrastructure from storing the complete URL. A partially masked key in the example does not mitigate the issue because an agent following these instructions would substitute the real credential at runtime.
Attack Path
- A user or agent follows the documented order-query procedure.
- The real API key is inserted into the
tokenquery parameter. - The complete URL is retained by a client, shell history, proxy, API gateway, server access log, or observability platform.
- An attacker or an unauthorized operator gains access to one of those records.
- The attacker extracts the API key and submits authenticated requests to the TripNow API.
- The attacker exercises whichever API scopes are assigned to the compromised key until the key is revoked or expires.
Impact Assessment
A compromised key may permit access to capabilities associated with its configured scopes, including restaurant searches, retrieval of booking results and associated cal ...[truncated 375 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the
tokenquery parameter from the endpoint contract and all examples. - Authenticate exclusively through the request header:
bash curl -X GET \ "https://tripnowengine.133.cn/tripnow/v1/voice/callback_find?order_id=RESORD216873707229" \ -H "Authorization: Bearer $TRIPNOW_API_KEY"- Reject API credentials supplied through query parameters at the server.
- If immediate API-contract changes are not possible:
- Use narrowly scoped, short-lived query tokens rather than the primary API key.
- Redact sensitive query parameters in clients, proxies, gateways, servers, and telemetry platforms.
- Disable unnecessary request-URL logging.
- Prevent sensitive commands from being retained in shell history.
- Rotate any API key that has previously been transmitted in a URL.
- Apply least-privilege scopes, expiration, rate limits, and anomaly monitoring to all replacement credentials.
- Add automated documentation and configuration checks that reject examples containing secrets in URL query parameters.
- Remove the
