MEDIUM AI PREVALENCE: MEDIUM auth.oauth.pkce-plain
PKCE is configured with code_challenge_method=plain.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
The plain method sends the code_verifier itself as the code_challenge, so an attacker who intercepts the authorization request learns the verifier and PKCE provides no protection against authorization-code interception.
Use code_challenge_method=S256: derive code_challenge = BASE64URL-NoPad(SHA256(code_verifier)) (RFC 7636 §4.2). S256 is mandatory for clients that can compute SHA-256.
VULNERABLE
SAFE
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.oauth.pkce-plain -- <reason>