T09 · Insecure Skill Coding Practices
- Location
scripts/video-generate.py:43- Finding
Unrestricted API Base Can Expose API Credentials and Storyboard Prompts
- Content
View full analysis
- Remediation
View remediation
str: parsed = urlsplit(base) if parsed.scheme != "https": raise ValueError("The API base must use HTTPS") if parsed.hostname not in ALLOWED_API_HOSTS: raise ValueError("Untrusted API hostname") if parsed.username or parsed.password: raise ValueError("Credentials must not be embedded in the API URL") if parsed.port not in (None, 443): raise ValueError("Unexpected API port") return base.rstrip("/") ``` ]]>
