MEDIUM AI PREVALENCE: MEDIUM auth.oauth.no-nonce
OIDC authorization request (scope contains openid) is being built WITHOUT a nonce parameter.
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 nonce binds the id_token to this specific authorization request. Without it, an attacker can replay or substitute a stolen/forged id_token (OIDC Core §3.1.2.1).
Generate a cryptographically random nonce, store it in the session/cookie, send it on the authorize call, and verify the nonce claim in the returned id_token. It is REQUIRED for the implicit and hybrid flows and RECOMMENDED for the authorization-code flow.
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.no-nonce -- <reason>