T09 · Insecure Skill Coding Practices
Error
- Location
- checker.py:197
- Finding
- Undisclosed Transmission of User Content to Brave Search## Vulnerability Details **File Location**: `checker.py:197-200`, `datasource.py:42-52`, `SKILL.md:23-30` **Vulnerability Type**: Privacy violation and undisclosed external data transmission **Risk Level**: High ### Vulnerable Code ```python # checker.py:197-200 def _check_sentence(self, sentence: str, position: int, result: CheckResult, explain: ConfidenceExplain): """Single-sentence check""" # Data source search search_results = self.datasource.get_search_results(sentence) ``` ```python # datasource.py:42-52 headers = { "Accept": "application/json", "X-Subscription-Token": self.api_key } params = { "q": query, "count": self.count } try: resp = requests.get(self.base_url, headers=headers, params=params, timeout=5) ``` The documentation claims that submitted content is processed locally and is not uploaded to external servers. However, when the Brave data source is configured, every sentence is passed directly to `get_search_results()` and included in the `q` query parameter of an HTTPS request to `api.search.brave.com`. ### Technical Analysis This creates a material discrepancy between the documented privacy model and actual runtime behavior. Complete user sentences may contain personal information, confidential business data, credentials, unpublished claims, or other sensitive material. Query parameters can also be recorded by the remote provider and network infrastructure involved in processing the request. Although Brave integration requires configuration containing an API key, the code does not request per-query consent, display a transmission warning, redact sensitive information, or minimize the submitted query. ### Attack Path 1. A user relies on the Skill's statement that submitted content never leaves the local environment. 2. The user or administrator enables the Brave data source and supplies an API key. 3. The user submits confidential text for ...[truncated 711 chars]
- Remediation
- ## Remediation Suggestions 1. Correct `SKILL.md`, package metadata, and `get_metadata()` so they explicitly disclose that configured external data sources receive search queries. 2. Keep remote data sources disabled by default. 3. Require explicit, informed consent before transmitting each document or batch. 4. Display the destination domain and the exact data category that will be transmitted. 5. Minimize queries by extracting non-sensitive keywords locally instead of sending complete sentences. 6. Add optional local redaction for email addresses, credentials, identifiers, and other sensitive patterns. 7. Provide a strictly offline mode that prevents all outbound requests. 8. Add integration tests confirming that no network request occurs unless external search has been explicitly enabled.
