T09 · Insecure Skill Coding Practices
- Location
scripts/lib/oauth2.py:82- Finding
OAuth2 secrets can be transmitted to an arbitrary or plaintext token endpoint
- Content
View full analysis
Any: """Create an OAuth2Manager if the config uses oauth2 auth.""" if cfg.get("auth") != "oauth2": return None oauth2_cfg = cfg.get("oauth2", {}) if not oauth2_cfg: return None from .oauth2 import OAuth2Manager return OAuth2Manager(oauth2_cfg) ``` ### Technical Analysis The OAuth2 refresh request includes the reusable refresh token and, when configured, the OAuth client secret. The destination is controlled entirely by `token_uri`; the implementation does not: - Require HTTPS. - Restrict the endpoint to an approved identity provider. - Reject loopback, private, link-local, or cloud metadata addresses. - Disable redirects or revalidate redirect destinations. Consequently, a malicious or compromised configuration can ...[truncated 1586 chars]- Remediation
View remediation
