T09 · Insecure Skill Coding Practices
- Location
SKILL.md:256- Finding
Reusable API Key Exposed in Account-Linking URL
- Content
View full analysis
`关联账户 ``` At line 345: ```markdown 加载已保存的API Key,生成登录链接:`https://call-bridge.dev/sign-in?token=`。不要为账户关联创建新Key,需先完成至少一次外呼后才有Key可关联. ``` The document also directs the Agent to retain sign-in URLs at line 82: ```markdown - 保留所有返回的`action.url`与`action.sign_in_url` ``` ### Technical Analysis The Skill instructs the Agent to place a reusable API key in the `token` query parameter of an account-linking URL. URL query parameters commonly propagate into browser history, bookmarks, copied links, screenshots, HTTP proxy logs, web-server access logs, monitoring systems, analytics platforms, and potentially `Referer` headers. This risk is aggravated by the instruction to retain returned `action.sign_in_url` values. Retaining a URL that embeds a reusable credential extends the period during which the credential may be recovered from Agent output, conversation history, local state, or service logs. Unlike a short-lived, single-use authorization code, the documented value is the saved API key itself. Consequently, disclosure of the URL can amount to disclosure of the underlying API credential. ### Attack Path 1. The Agent loads the user's saved Call Bridge API key. 2. It constructs or receives an account-linking URL in the form `https://call-bridge.dev/sign-in?token=`. 3. The URL is displayed, retained, opened in a browser, or recorded in Agent or infrastructure logs. 4. An attacker with access to browser history, logs, conversation output, screenshots, analytics data, or a copied link extracts the `token` query value. 5. The attacker attempts to reuse the exposed key against the Call Bridge account-linking flow or API. 6. If the key remains valid and has sufficient ...[truncated 613 chars]- Remediation
View remediation
