Skip to content

Commit ff06181

Browse files
committed
Rust: We actually want barriers on set_secure(false) as well as set_secure(true), to prevent excessive flow paths.
1 parent 5fed5a2 commit ff06181

File tree

3 files changed

+142
-263
lines changed

3 files changed

+142
-263
lines changed

rust/ql/src/queries/security/CWE-614/InsecureCookie.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ module InsecureCookieConfig implements DataFlow::ConfigSig {
3939
node instanceof Sink
4040
}
4141

42-
predicate isBarrier(DataFlow::Node node) {
43-
// setting the 'secure' attribute to true
44-
cookieSetNode(node, "secure", true)
42+
predicate isBarrierIn(DataFlow::Node node) {
43+
// setting the 'secure' attribute
44+
cookieSetNode(node, "secure", _)
4545
or
4646
node instanceof Barrier
4747
}

0 commit comments

Comments
 (0)