T09 · Insecure Skill Coding Practices
- Location
scripts/wechat.py:2505- Finding
Enterprise chat content and contact identities are transmitted to an unrestricted endpoint
- Content
View full analysis
List[Dict[str, Any]]: try: headers = { "Content-Type": "application/json", "Authorization": f"Bearer {api_key}" } data = { "model": model, "messages": customer_messages, "stream": False, "temperature": 0.7, "max_tokens": 1000 } data["user_id"] = None data["user_name"] = contact_name response = requests.post( api_url, json=data, headers=headers, timeout=30 ) ``` The data flow is invoked after chat messages are extracted: ```python ai_replies = self._call_ai_api( current_chat_name, chat_data, api_url, api_key, model ) ``` ### Technical Analysis The request body contains the extracted conversation in `messages` and the contact identity in `user_name`. The destination is supplied through `api_url` without a hostname allowlist, scheme restriction, destination validation, or user confirmation immediately before disclosure. Network transmission is necessary for the optional AI-reply feature, but unrestricted transmission is not the minimum privilege required. A secure implementation could constrain requests to explicitly trusted HTTPS endpoints and minimize or redact the data sent. The behavior also conflicts with the privacy statement in `SKILL.md:211-214`, which says that operations remain local and no data is uploaded. Users may therefore enable the feature without informed consent to the actual disclo ...[truncated 1092 chars]- Remediation
View remediation
