T09 · Insecure Skill Coding Practices
- Location
scripts/fde_client.py:27- Finding
Configurable API base URL permits sensitive data transmission to arbitrary or plaintext endpoints
- Content
View full analysis
dict[str, Any]: url = f"{self.base_url}{self.prefix}{path}" headers = {"Accept": "application/json", "User-Agent": "enterprise-ai-landing-guide-skill/1.2.0"} if token: headers["Authorization"] = f"Bearer {token}" if idempotency_key: headers["Idempotency-Key"] = idempotency_key data: bytes | None = None if isinstance(body, bytes): data = body headers["Content-Type"] = content_type elif body is not None: data = json.dumps(body, ensure_ascii=False).encode("utf-8") headers["Content-Type"] = "application/json" request = urllib.request.Request(url, data=data, headers=headers, method=method) try: with urllib.request.urlopen(request, timeout=self.timeout) as response: return self._json(response.read()) ``` ```python root.add_argument("--base-url", default=os.environ.get("ENTERPRISE_AI_LANDING_API_BASE", "https://fde.lantuzhigou.com")) ``` ### Technical Analysis The client accepts its API base URL directly from the `ENTERPRISE_AI_LANDING_API_BASE` environment variable or the `--base-url` command-line option. It removes only a trailing slash and performs no validation of: - The URL ...[truncated 2890 chars]- Remediation
View remediation
