T09 · Insecure Skill Coding Practices
- Location
SKILL.md:30- Finding
Bearer API Key Can Be Sent to an Untrusted Configurable Host
- Content
View full analysis
dict: headers = {"Authorization": f"Bearer {KEY}", "Accept": "application/json"} if json_body is not None: headers["Content-Type"] = "application/json" r = httpx.request(method, f"{BASE}{path}", params=params, json=json_body, headers=headers, timeout=30.0) ``` ### Technical Analysis The supplied Node.js and Python clients read `HEYI_API_BASE_URL` and attach the bearer credential to the resulting destination without validating: - The URL scheme - The destination hostname - The destination port - Whether the request path begins with `/api/external/` - Whether the destination belongs to an explicitly approved staging environment The surrounding instructions state that arbitrary hosts must not be u ...[truncated 1621 chars]- Remediation
View remediation
