File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
java/ql/src/Security/CWE/CWE-319 Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class HTTPStringToURLOpenMethodFlowConfig extends TaintTracking::Configuration {
36
36
37
37
override predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof HTTPString }
38
38
39
- override predicate isSink ( DataFlow:: Node sink ) { sinkNode ( sink , "open-url" ) }
39
+ override predicate isSink ( DataFlow:: Node sink ) { sink instanceof URLOpenSink }
40
40
41
41
override predicate isAdditionalTaintStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
42
42
exists ( UrlConstructorCall u |
@@ -50,6 +50,13 @@ class HTTPStringToURLOpenMethodFlowConfig extends TaintTracking::Configuration {
50
50
}
51
51
}
52
52
53
+ /**
54
+ * A sink that represents a URL opening method call, such as a call to `java.net.URL.openConnection()`.
55
+ */
56
+ private class URLOpenSink extends DataFlow:: Node {
57
+ URLOpenSink ( ) { sinkNode ( this , "open-url" ) }
58
+ }
59
+
53
60
from DataFlow:: PathNode source , DataFlow:: PathNode sink , MethodAccess m , HTTPString s
54
61
where
55
62
source .getNode ( ) .asExpr ( ) = s and
You can’t perform that action at this time.
0 commit comments