Untrusted request data flows into the URL of an outbound HTTP request.
Why AI tools produce this: AI coding tools generate this anti-pattern by default, it appears in a large share of AI-written auth code.
Dataflow rule. This is a taint-mode rule: it traces untrusted request input (query, body, params, cookies, headers) through your code to the URL of an outbound HTTP request, so indirection across multiple lines is caught, not just the direct one-line form. Routing the value through a recognised validation / allow-list sanitizer clears the taint and suppresses the finding. Why dataflow →
Why this matters
An attacker who controls the request target (via a query parameter, form field, or request header) can coerce your server into making requests to arbitrary destinations, Server-Side Request Forgery (SSRF). This is routinely abused to reach internal-only services behind your network perimeter and, most damagingly, the cloud instance metadata endpoint (e.g. http://169.254.169.254/...), letting an attacker steal short-lived credentials and pivot into your cloud account.
Never pass a request-derived value straight into http.Get, http.Post, http.NewRequest, or a client's Get/Post. Validate the destination host against an explicit allow-list (parse the URL and check the resolved host/scheme), and reject requests to private, loopback, and link-local address ranges before dialing. See CWE-918.
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.go.flow.ssrf -- <reason>