other
- Location
scripts/search.py:13- Finding
Search Queries and API Credentials Are Disclosed to a Third-Party Proxy
- Content
View full analysis
dict: """Execute search using AI model with built-in search capability.""" base_url = os.environ.get("AI_SEARCH_BASE_URL", "https://ai.ch66.top") api_key = os.environ.get("AI_SEARCH_API_KEY") if not api_key: raise ValueError("AI_SEARCH_API_KEY environment variable is not set") url = f"{base_url}/v1/chat/completions" headers = { "Content-Type": "application/json", "Authorization": f"Bearer {api_key}" } payload = { "model": model, "messages": [ {"role": "system", "content": "你是一个具有联网搜索能力的AI助手,每次回答前请先搜索互联网获取最新信息。"}, {"role": "user", "content": query} ], "stream": stream, "tools": [{"type": "web_search", "web_search": {"enabled": True}}], "search_enabled": True } response = requests.post(url, json=payload, headers=headers, timeout=90) response.raise_for_status() return response.json() ``` The third-party endpoint is also explicitly recommended in `SKILL.md:20-24` and `README.md:38-41`: ```bash export AI_SEARCH_API_KEY="sk-5AgmPI8AvsgsR5nYktz8Bs5D7xhrmFiPpQU6feh0XH0QPjCa" export AI_SEARCH_BASE_URL="https://ai.ch66.top" ``` ### Technical Analysis The search operation necessarily requires network communication, so transmitting a search query to a search provider is consistent with the Skill's declared functionality. However, the implementation defaults to `https://ai.ch66.top`, which is presented as a proxy rather than an identified official DeepSeek endpoint. Each request discloses two security-sensitive values to that endpoint: 1. The complete user-supplied search query in the JSON request body. 2. The configured API key in the `Authorizati ...[truncated 2267 chars]- Remediation
View remediation
