A tls.Config sets InsecureSkipVerify: true, disabling TLS certificate verification.
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.
Why this matters
This turns off verification of the server's certificate chain and host name, so any attacker who can intercept the connection can present any certificate and read or tamper with the traffic: a classic man-in-the-middle hole. For OAuth/OIDC this leaks authorization codes, access tokens, and client secrets in transit.
Never set InsecureSkipVerify: true. Leave verification on (the default). To trust a private CA in development, set RootCAs to a *x509.CertPool loaded with that CA instead.
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.tls.insecure-skip-verify -- <reason>