Skip to content

Commit cba4f04

Browse files
edvraaowen-mc
authored andcommitted
Use package
1 parent 167496e commit cba4f04

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ql/src/experimental/CWE-1004/AuthCookie.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private predicate isAuthVariable(Expr expr) {
4242
private class SetCookieSink extends DataFlow::Node {
4343
SetCookieSink() {
4444
exists(CallExpr c |
45-
c.getTarget().hasQualifiedName("net/http", "SetCookie") and
45+
c.getTarget().hasQualifiedName(package("net/http", ""), "SetCookie") and
4646
this.asExpr() = c.getArgument(1)
4747
)
4848
}
@@ -57,7 +57,7 @@ class NetHttpCookieTrackingConfiguration extends TaintTracking::Configuration {
5757
override predicate isSource(DataFlow::Node source) {
5858
exists(StructLit sl |
5959
source.asExpr() = sl and
60-
sl.getType().hasQualifiedName("net/http", "Cookie")
60+
sl.getType().hasQualifiedName(package("net/http", ""), "Cookie")
6161
)
6262
}
6363

@@ -82,7 +82,7 @@ private class NameToNetHttpCookieTrackingConfiguration extends TaintTracking2::C
8282

8383
override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
8484
exists(StructLit sl |
85-
sl.getType().hasQualifiedName("net/http", "Cookie") and
85+
sl.getType().hasQualifiedName(package("net/http", ""), "Cookie") and
8686
getValueForFieldWrite(sl, "Name") = pred and
8787
sl = succ.asExpr()
8888
)
@@ -101,7 +101,7 @@ class BoolToNetHttpCookieTrackingConfiguration extends TaintTracking::Configurat
101101

102102
override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
103103
exists(StructLit sl |
104-
sl.getType().hasQualifiedName("net/http", "Cookie") and
104+
sl.getType().hasQualifiedName(package("net/http", ""), "Cookie") and
105105
getValueForFieldWrite(sl, "HttpOnly") = pred and
106106
sl = succ.asExpr()
107107
)
@@ -171,7 +171,7 @@ class GorillaCookieStoreSaveTrackingConfiguration extends DataFlow::Configuratio
171171
source
172172
.(DataFlow::CallNode)
173173
.getTarget()
174-
.hasQualifiedName("github.com/gorilla/sessions", "NewCookieStore")
174+
.hasQualifiedName(package("github.com/gorilla/sessions", ""), "NewCookieStore")
175175
}
176176

177177
override predicate isSink(DataFlow::Node sink) { sink instanceof GorillaSessionSaveSink }
@@ -196,7 +196,7 @@ class GorillaSessionOptionsTrackingConfiguration extends TaintTracking::Configur
196196

197197
override predicate isSource(DataFlow::Node source) {
198198
exists(StructLit sl |
199-
sl.getType().hasQualifiedName("github.com/gorilla/sessions", "Options") and
199+
sl.getType().hasQualifiedName(package("github.com/gorilla/sessions", ""), "Options") and
200200
source.asExpr() = sl
201201
)
202202
}

0 commit comments

Comments
 (0)