Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll

Co-authored-by: Esben Sparre Andreasen <esbena@github.com>
This commit is contained in:
Alessio Della Libera
2020-08-16 14:31:21 +02:00
committed by GitHub
parent 14c8e4ce76
commit a2e9456450

View File

@@ -94,8 +94,9 @@ module InsecureCookie {
result = this.getCookieOptionsArgument().getAPropertyWrite(flag).getRhs()
}
// A cookie is insecure if there are not cookie options with the `secure` flag set to `true`.
override predicate isInsecure() {
// A cookie is insecure if there are not cookie options with the `secure` flag set to `true`.
not exists(DataFlow::SourceNode cookieOptions |
cookieOptions = this.getCookieOptionsArgument() and
getCookieFlagValue(flag()).mayHaveBooleanValue(true)