File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
java/ql/src/Security/CWE/CWE-614 Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,19 @@ predicate isSafeSecureCookieSetting(Expr e) {
26
26
)
27
27
}
28
28
29
- from MethodAccess add
29
+ class SecureCookieConfiguration extends DataFlow:: Configuration {
30
+ SecureCookieConfiguration ( ) { this = "SecureCookieConfiguration" }
31
+
32
+ override predicate isSource ( DataFlow:: Node source ) { any ( ) }
33
+
34
+ override predicate isSink ( DataFlow:: Node sink ) { any ( ) }
35
+ }
36
+
37
+ from MethodAccess add , SecureCookieConfiguration df
30
38
where
31
39
add .getMethod ( ) instanceof ResponseAddCookieMethod and
32
40
not exists ( Variable cookie , MethodAccess m |
33
- add . getArgument ( 0 ) = cookie .getAnAccess ( ) and
41
+ df . hasFlow ( DataFlow :: exprNode ( cookie .getAnAccess ( ) ) , DataFlow :: exprNode ( add . getArgument ( 0 ) ) ) and
34
42
m .getMethod ( ) .getName ( ) = "setSecure" and
35
43
forex ( DataFlow:: Node argSource |
36
44
DataFlow:: localFlow ( argSource , DataFlow:: exprNode ( m .getArgument ( 0 ) ) ) and
You can’t perform that action at this time.
0 commit comments