T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:92- Finding
Bearer API Credential Can Be Redirected to an Arbitrary Server
- Content
View full analysis
- Remediation
View remediation
str: value = value.rstrip("/") parsed = urlparse(value) origin = f"{parsed.scheme}://{parsed.netloc}" if parsed.scheme != "https": raise SystemExit("Authenticated API requests require HTTPS.") if origin not in ALLOWED_API_ORIGINS and not allow_unsafe_dev_endpoint: raise SystemExit("Unapproved API origin.") return value ``` ]]>
