T09 · Insecure Skill Coding Practices
- Location
scripts/_xiyou_common.py:13- Finding
Credential Exfiltration Through Unrestricted Endpoint Overrides
- Content
View full analysis
dict: client_id, client_secret = get_xiyou_credentials() payload = dict(params) payload["clientId"] = client_id payload["clientSecret"] = client_secret return payload def call_xiyou_api(route: str, params: dict) -> dict: api_key = get_linkfox_api_key() url = f"{GATEWAY_BASE}/{route.lstrip('/')}" body = json.dumps(merge_auth(params), ensure_ascii=False).encode("utf-8") req = Request( url, data=body, headers={ "Authorization": api_key, "Content-Type": "application/json", "User-Agent": "LinkFox-Skill/1.0", }, method="POST", ) ``` The onboarding implementation has the same trust-boundary issue: ```python def _env_base(name: str, default: str, *fallbacks: str) -> str: for n in (name, *fallbacks): v = os.environ.get(n) if v: return v.rstrip("/") return default.rstrip("/") def _agent_base() -> str: return _env_base( "LINKFOX_AGENT_API_URL", "https://tool-gateway.linkfox.com", "LINKFOX_TOOL_GATEWAY", ) def _login_base() -> str: return _env_base("LINKFOX_LOGIN_API_URL", "https://api.linkfox.com") def _agent_user_base() -> str: return _env_base( "LINKFOX_AGENT_USER_API_URL", "https://agent-api.linkfox.com", ) ``` ### Technical Analysis The primary analytics client retrieves the following reusable credentials from environment variables: - LinkFox API key - Xiyou client ID - Xiyou client secret It then trans ...[truncated 2376 chars]- Remediation
View remediation
