A Ktor session cookie is configured without cookie.secure = true, so the browser will send it over plain HTTP as well as HTTPS.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
On any unencrypted request the session identifier is exposed to network eavesdroppers and can be captured and replayed to hijack the session (CWE-614, Sensitive Cookie Without 'Secure' Attribute). This is a common AI-generated mistake: the cookie<Session>(...) { } block sets path/maxAge but omits the security flags.
Mark the cookie secure (and add signing/encryption) inside the block: cookie.secure = true cookie.httpOnly = true transform(SessionTransportTransformerEncrypt(encryptKey, signKey))
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.kotlin.cookie.insecure-session -- <reason>