HIGH AI PREVALENCE: HIGH auth.rust.cookie.insecure
A session/auth cookie is built with a security attribute explicitly disabled (secure(false) or http_only(false)).
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
With secure(false) the cookie is sent over plain HTTP, so a network attacker can read the session token. With http_only(false) the cookie is readable from JavaScript, so any XSS can steal it. For OAuth/OIDC this exposes session and token cookies to theft and hijacking.
Set secure(true) and http_only(true) on auth cookies, and add an appropriate SameSite mode (for example same_site(SameSite::Lax)).
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.rust.cookie.insecure -- <reason>