MEDIUM AI PREVALENCE: HIGH auth.cookie.no-secure
A cookie that looks like a session or auth cookie is being set WITHOUT the Secure flag.
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
The browser will happily send it over plain HTTP, which means a network attacker (open Wi-Fi, malicious proxy, downgrade attack) can capture it.
Add { secure: true } to the cookie options. If you absolutely need to set Secure-less cookies in dev, gate it on NODE_ENV !== 'production'.
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.cookie.no-secure -- <reason>