T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:109
- Finding
- Disclosure of Sensitive URL Data to a Third-Party Extraction Service<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 109–148 **Vulnerability Type**: Sensitive information disclosure through third-party URL processing **Risk Level**: Medium ### Vulnerable Code ```python import requests BASE = "https://api.scavio.dev" # Your key from https://scavio.dev. Load it from your environment or secret # store in real code - keep it out of source control. API_KEY = "sk_your_key_here" HEADERS = {"Authorization": f"Bearer {API_KEY}"} # 1. The common case: a page as clean Markdown, 1 credit page = requests.post(f"{BASE}/api/v1/extract", headers=HEADERS, json={"url": "https://example.com/pricing"}).json() ``` The generic extraction function forwards any supplied URL: ```python def read(url, format="markdown"): """normal (1cr) -> advanced (1cr) -> ultra (2cr). Only the successful call is billed.""" for mode in ("normal", "advanced", "ultra"): r = requests.post(f"{BASE}/api/v1/extract", headers=HEADERS, json={"url": url, "format": format, "mode": mode}) if r.status_code == 200: data = r.json()["data"] if data["content_length"]: return data if r.status_code == 400: break # bad or blocked URL - a higher tier will not fix it return None ``` ### Technical Analysis The Skill's declared purpose requires a remote service to fetch and transform web pages, so transmitting a target URL to Scavio is functionally necessary. The API credential is also sent only to the declared HTTPS API endpoint through the `Authorization` header, which is consistent with normal API authentication. However, the generic `read` function forwards the complete user-supplied URL to `https://api.scavio.dev/api/v1/extract` without checking whether the URL contains sensitive data. URLs can carry bearer secrets in their path, fragment, or query parameters, including: - Signed object-storage download parameters - Password-res ...[truncated 1878 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Clearly disclose that complete target URLs are sent to Scavio for server-side retrieval. 2. Detect common credential-bearing query parameters such as `token`, `key`, `signature`, `sig`, `auth`, `session`, `code`, and cloud-provider signed URL fields. 3. Require explicit user confirmation before transmitting a URL that appears signed, private, or tokenized. 4. Remove tracking and nonessential query parameters before submission where doing so will not change the requested resource. 5. Do not automatically redact parameters required to retrieve the resource; instead, explain the third-party disclosure and request informed confirmation. 6. Avoid recording complete target URLs in local logs. Log only the origin or a redacted representation. 7. Document Scavio's URL retention, access-control, subprocessors, and deletion practices or link directly to the applicable privacy documentation. 8. Where confidentiality is required, provide a local-fetch alternative that does not disclose the target URL to a third-party extraction provider. ]]>
