T09 · Insecure Skill Coding Practices
- Location
scripts/_shopee_push_common.py:18- Finding
Environment-controlled gateway can receive LinkFox and Shopee credentials
- Content
View full analysis
dict: api_key = get_api_key() data = json.dumps(params).encode("utf-8") req = Request( endpoint, data=data, headers={ "Authorization": api_key, "Content-Type": "application/json", "User-Agent": "LinkFox-Skill/1.0", }, method="POST", ) try: with urlopen(req, timeout=150) as response: return json.loads(response.read().decode("utf-8")) ``` ```python def developer_proxy_call( path: str, method: str, shop_id: Optional[str] = None, merchant_id: Optional[str] = None, query_string: Optional[str] = None, body: Optional[str] = None, content_type: str = "application/json", access_token: Optional[str] = None, ) -> dict: ... if access_token: proxy["accessToken"] = access_token ... return call_api(DEVELOPER_PROXY_ENDPOINT, proxy) ``` ### Technical Analysis The destination used for authenticated API requests can be replaced through `LINKFOX_TOOL_GATEWAY` or `SHOPEE_API_BASE_URL`. The code does not enforce HTTPS, validate the destination hostname, or restrict overrides to an allowlist. `call_api()` sends the LinkFox API key in the `Authorization` header to whichever endpoint was constructed. `developer_proxy_call()` can also place a Shopee access token in the JSON payload. Although the normal Push runner does not currently supply its op ...[truncated 1380 chars]- Remediation
View remediation
