T09 · Insecure Skill Coding Practices
- Location
SKILL.md:32- Finding
Authenticated API Key May Be Sent to an Untrusted Configured Base URL
- Content
View full analysis
` for Superior Trade product API keys. Browser/session callers may use `Authorization: Bearer `. ``` ### Technical Analysis The Skill instructs the Agent to use an environment-configured API base URL and attach the `SUPERIOR_TRADE_PM_API_KEY` as an `x-api-key` header. Although two legitimate endpoints are documented, the instructions do not require the configured URL to match either endpoint. They also do not explicitly require HTTPS, reject embedded credentials, or prohibit forwarding authentication headers across redirects. Consequently, an attacker who can influence the environment configuration could supply an attacker-controlled URL. Subsequent requests made according to the Skill could disclose the API key and sensitive request data to that endpoint. This is especially significant because the declared API key is not read-only. Its documented scope includes managing trading accounts, initiating funding actions, placing immediate market orders, running backtests, and managing deployments. ### Attack Path 1. An attacker gains the ability to modify or influence the environment-configured Superior Trade API base URL. 2. The attacker changes the URL to an endpoint under their control or to an endpoint that redirects to their infrastructure. 3. The Agent follows the Skill instructions and makes a request using the configured URL. 4. The Agent attaches `SUPERIOR_TRADE_PM_API_KEY` in the `x-api-key` header, or a session token in the `Authorization` header. 5. The attacker captures the credential and any accompanying account, wallet, strategy, o ...[truncated 1061 chars]- Remediation
View remediation
