Skip to content

Commit 1b1c3f9

Browse files
committed
Remove localflow from the source
1 parent b366ffa commit 1b1c3f9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

java/ql/src/experimental/Security/CWE/CWE-1004/SensitiveCookieNotHttpOnly.ql

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class SetCookieMethodAccess extends MethodAccess {
4545
class SensitiveCookieNameExpr extends Expr {
4646
SensitiveCookieNameExpr() {
4747
exists(
48-
ClassInstanceExpr cie, Expr e // new Cookie("jwt_token", token)
48+
ClassInstanceExpr cie // new Cookie("jwt_token", token)
4949
|
5050
(
5151
cie.getConstructor().getDeclaringType().hasQualifiedName("javax.servlet.http", "Cookie") or
@@ -55,16 +55,14 @@ class SensitiveCookieNameExpr extends Expr {
5555
.hasQualifiedName(["javax.ws.rs.core", "jakarta.ws.rs.core"], "Cookie")
5656
) and
5757
this = cie and
58-
isSensitiveCookieNameExpr(e) and
59-
DataFlow::localExprFlow(e, cie.getArgument(0))
58+
isSensitiveCookieNameExpr(cie.getArgument(0))
6059
)
6160
or
6261
exists(
63-
SetCookieMethodAccess ma, Expr e // response.addHeader("Set-Cookie: token=" +authId + ";HttpOnly;Secure")
62+
SetCookieMethodAccess ma // response.addHeader("Set-Cookie: token=" +authId + ";HttpOnly;Secure")
6463
|
6564
this = ma.getArgument(1) and
66-
isSensitiveCookieNameExpr(e) and
67-
DataFlow::localExprFlow(e, ma.getArgument(1))
65+
isSensitiveCookieNameExpr(this)
6866
)
6967
}
7068
}

0 commit comments

Comments
 (0)