A cookie is created with HttpOnly = false, making it readable from client-side JavaScript.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
If the site has any XSS, an injected script can read the auth/session cookie via document.cookie and exfiltrate the session (CWE-1004). This is a common AI-generated change made so JS can "see" the cookie, which needlessly removes a key defense.
Set HttpOnly = true on authentication and session cookies so they are not exposed to scripts. If the browser must read a value, keep it in a separate non-sensitive cookie rather than weakening the session cookie.
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.csharp.cookie.httponly-false -- <reason>