@@ -16,19 +16,20 @@ import semmle.code.java.dataflow.FlowSources
16
16
import semmle.code.java.dataflow.TaintTracking
17
17
import semmle.code.java.security.PathSanitizer
18
18
import AndroidWebResourceResponse
19
- import DataFlow :: PathGraph
19
+ import InsecureWebResourceResponseFlow :: PathGraph
20
20
21
- class InsecureWebResourceResponseConfig extends TaintTracking :: Configuration {
22
- InsecureWebResourceResponseConfig ( ) { this = "InsecureWebResourceResponseConfig" }
21
+ module InsecureWebResourceResponseConfig implements DataFlow :: ConfigSig {
22
+ predicate isSource ( DataFlow :: Node src ) { src instanceof RemoteFlowSource }
23
23
24
- override predicate isSource ( DataFlow:: Node src ) { src instanceof RemoteFlowSource }
24
+ predicate isSink ( DataFlow:: Node sink ) { sink instanceof WebResourceResponseSink }
25
25
26
- override predicate isSink ( DataFlow:: Node sink ) { sink instanceof WebResourceResponseSink }
27
-
28
- override predicate isSanitizer ( DataFlow:: Node node ) { node instanceof PathInjectionSanitizer }
26
+ predicate isBarrier ( DataFlow:: Node node ) { node instanceof PathInjectionSanitizer }
29
27
}
30
28
31
- from DataFlow:: PathNode source , DataFlow:: PathNode sink , InsecureWebResourceResponseConfig conf
32
- where conf .hasFlowPath ( source , sink )
29
+ module InsecureWebResourceResponseFlow = TaintTracking:: Global< InsecureWebResourceResponseConfig > ;
30
+
31
+ from
32
+ InsecureWebResourceResponseFlow:: PathNode source , InsecureWebResourceResponseFlow:: PathNode sink
33
+ where InsecureWebResourceResponseFlow:: flowPath ( source , sink )
33
34
select sink .getNode ( ) , source , sink , "Leaking arbitrary content in Android from $@." ,
34
35
source .getNode ( ) , "this user input"
0 commit comments