T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:89- Finding
AI-HIVE API Key Disclosure Through a User-Controlled Base URL
- Content
View full analysis
- Remediation
View remediation
str: parsed = urlparse(value) if parsed.scheme != "https": raise SystemExit("The API base URL must use HTTPS.") if parsed.hostname not in ALLOWED_API_HOSTS: raise SystemExit("The API hostname is not trusted.") if parsed.username or parsed.password or parsed.fragment: raise SystemExit("The API base URL contains prohibited components.") return value.rstrip("/") ``` ]]>
