T09 · Insecure Skill Coding Practices
- Location
scripts/datacloud_client.py:274- Finding
Salesforce Bearer Token Can Be Disclosed Through an Unvalidated Pagination URL
- Content
View full analysis
- Remediation
View remediation
str: trusted = urlparse(self.auth.instance_url) resolved = urlparse(urljoin(self.auth.instance_url, candidate)) if resolved.scheme != "https": raise RuntimeError("Refusing non-HTTPS API URL") trusted_port = trusted.port or 443 resolved_port = resolved.port or 443 if ( resolved.hostname != trusted.hostname or resolved_port != trusted_port or resolved.username is not None or resolved.password is not None ): raise RuntimeError("Refusing cross-origin API URL") return resolved.geturl() ``` ]]>
