Aller au contenu

Cookie Missing HttpOnly (ARCH8124)

Ce contenu n’est pas encore disponible dans votre langue.

Key kotlin.security.cookie-missing-httponly · Severity warning · Category security · CWE CWE-1004

Flags session / auth cookies created without isHttpOnly = true - readable by any script on the page.

Cookie("auth", token).apply { secure = true }
Cookie("auth", token).apply { secure = true; isHttpOnly = true }

Set isHttpOnly = true on cookies JavaScript has no business reading.