T09 · Insecure Skill Coding Practices
- Location
scripts/authorize_url.py:17- Finding
API Credentials Can Be Exfiltrated Through Unvalidated Gateway Overrides
- Content
View full analysis
dict: api_key = get_api_key() data = json.dumps(params).encode("utf-8") req = Request( API_ENDPOINT, data=data, headers={ "Authorization": api_key, "Content-Type": "application/json", "User-Agent": "LinkFox-Skill/1.0", }, method="POST", ) with urlopen(req, timeout=150) as response: return json.loads(response.read().decode("utf-8")) ``` ### Technical Analysis The clients accept an arbitrary gateway base URL from environment variables and subsequently transmit the LinkFox API key in the `Authorization` header. There is no validation of the URL scheme, hostname, port, embedded credentials, or destination. Although a configurable endpoint can be useful for development, sending a production credential to any environment-selected destination exceeds the minimum privilege necessary for normal Skill operation. In particular, the implementation does not require HTTPS and does not restrict credentials to the documented LinkFox gateway. The same unsafe endpoint-selection design is repeated across all store-management clients. The onboarding client also allows its login and user-service destinations to be overridden, including endpoints that receive ...[truncated 1392 chars]- Remediation
View remediation
