T09 · Insecure Skill Coding Practices
- Location
toolkit.py:31- Finding
Bearer Token Can Be Transmitted to an Arbitrary Network Destination
- Content
View full analysis
- Remediation
View remediation
str: parsed = urlsplit(raw_base.rstrip("/")) if parsed.scheme != "https": raise SystemExit("Error: HUANGLI_BASE must use HTTPS") if parsed.hostname not in ALLOWED_HOSTS: raise SystemExit("Error: HUANGLI_BASE host is not allowed") if parsed.username or parsed.password or parsed.fragment: raise SystemExit("Error: invalid HUANGLI_BASE") if parsed.port not in (None, 443): raise SystemExit("Error: unexpected HUANGLI_BASE port") return raw_base.rstrip("/") ``` ]]>
