Insecure Cookie (ARCH9123)
Ce contenu n’est pas encore disponible dans votre langue.
Key swift.security.insecure-cookie · Severity warning · Category security · CWE CWE-614
Flags cookies created with isSecure: false / without the secure attribute.
Incorrect
Section titled “Incorrect”HTTPCookies.Value(string: token, isSecure: false)Correct
Section titled “Correct”HTTPCookies.Value(string: token, isSecure: true, isHTTPOnly: true)Set isSecure (and isHTTPOnly for session cookies).