Skip to content

Commit 1cf4b60

Browse files
committed
Simplify non-https-url query
1 parent 8602a6f commit 1cf4b60

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ import java
1414
import semmle.code.java.security.HttpsUrlsQuery
1515
import DataFlow::PathGraph
1616

17-
from DataFlow::PathNode source, DataFlow::PathNode sink, MethodAccess m, HttpStringLiteral s
18-
where
19-
source.getNode().asExpr() = s and
20-
sink.getNode().asExpr() = m.getQualifier() and
21-
any(HttpStringToUrlOpenMethodFlowConfig c).hasFlowPath(source, sink)
22-
select m, source, sink, "URL may have been constructed with HTTP protocol, using $@.", s,
23-
"this source"
17+
from DataFlow::PathNode source, DataFlow::PathNode sink
18+
where any(HttpStringToUrlOpenMethodFlowConfig c).hasFlowPath(source, sink)
19+
select sink.getNode(), source, sink, "URL may have been constructed with HTTP protocol, using $@.",
20+
source.getNode(), "this source"

0 commit comments

Comments
 (0)