@@ -15,8 +15,8 @@ import semmle.code.java.frameworks.Networking
15
15
import DataFlow:: PathGraph
16
16
private import semmle.code.java.dataflow.ExternalFlow
17
17
18
- class HTTPString extends StringLiteral {
19
- HTTPString ( ) {
18
+ class HttpString extends StringLiteral {
19
+ HttpString ( ) {
20
20
// Avoid matching "https" here.
21
21
exists ( string s | this .getRepresentedString ( ) = s |
22
22
(
@@ -31,12 +31,12 @@ class HTTPString extends StringLiteral {
31
31
}
32
32
}
33
33
34
- class HTTPStringToURLOpenMethodFlowConfig extends TaintTracking:: Configuration {
35
- HTTPStringToURLOpenMethodFlowConfig ( ) { this = "HttpsUrls::HTTPStringToURLOpenMethodFlowConfig " }
34
+ class HttpStringToUrlOpenMethodFlowConfig extends TaintTracking:: Configuration {
35
+ HttpStringToUrlOpenMethodFlowConfig ( ) { this = "HttpsUrls::HttpStringToUrlOpenMethodFlowConfig " }
36
36
37
- override predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof HTTPString }
37
+ override predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof HttpString }
38
38
39
- override predicate isSink ( DataFlow:: Node sink ) { sink instanceof URLOpenSink }
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 |
@@ -53,14 +53,14 @@ class HTTPStringToURLOpenMethodFlowConfig extends TaintTracking::Configuration {
53
53
/**
54
54
* A sink that represents a URL opening method call, such as a call to `java.net.URL.openConnection()`.
55
55
*/
56
- private class URLOpenSink extends DataFlow:: Node {
57
- URLOpenSink ( ) { sinkNode ( this , "open-url" ) }
56
+ private class UrlOpenSink extends DataFlow:: Node {
57
+ UrlOpenSink ( ) { sinkNode ( this , "open-url" ) }
58
58
}
59
59
60
- from DataFlow:: PathNode source , DataFlow:: PathNode sink , MethodAccess m , HTTPString s
60
+ from DataFlow:: PathNode source , DataFlow:: PathNode sink , MethodAccess m , HttpString s
61
61
where
62
62
source .getNode ( ) .asExpr ( ) = s and
63
63
sink .getNode ( ) .asExpr ( ) = m .getQualifier ( ) and
64
- any ( HTTPStringToURLOpenMethodFlowConfig c ) .hasFlowPath ( source , sink )
64
+ any ( HttpStringToUrlOpenMethodFlowConfig c ) .hasFlowPath ( source , sink )
65
65
select m , source , sink , "URL may have been constructed with HTTP protocol, using $@." , s ,
66
66
"this source"
0 commit comments