@@ -5,8 +5,12 @@ import semmle.code.java.dataflow.FlowSources
5
5
import semmle.code.java.dataflow.TaintTracking
6
6
import semmle.code.java.security.UnsafeContentUriResolution
7
7
8
- /** A taint-tracking configuration to find paths from remote sources to content URI resolutions. */
9
- class UnsafeContentResolutionConf extends TaintTracking:: Configuration {
8
+ /**
9
+ * DEPRECATED: Use `UnsafeContentUriResolutionFlow` instead.
10
+ *
11
+ * A taint-tracking configuration to find paths from remote sources to content URI resolutions.
12
+ */
13
+ deprecated class UnsafeContentResolutionConf extends TaintTracking:: Configuration {
10
14
UnsafeContentResolutionConf ( ) { this = "UnsafeContentResolutionConf" }
11
15
12
16
override predicate isSource ( DataFlow:: Node src ) { src instanceof RemoteFlowSource }
@@ -21,3 +25,20 @@ class UnsafeContentResolutionConf extends TaintTracking::Configuration {
21
25
any ( ContentUriResolutionAdditionalTaintStep s ) .step ( node1 , node2 )
22
26
}
23
27
}
28
+
29
+ private module UnsafeContentResolutionConf implements DataFlow:: ConfigSig {
30
+ predicate isSource ( DataFlow:: Node src ) { src instanceof RemoteFlowSource }
31
+
32
+ predicate isSink ( DataFlow:: Node sink ) { sink instanceof ContentUriResolutionSink }
33
+
34
+ predicate isBarrier ( DataFlow:: Node sanitizer ) {
35
+ sanitizer instanceof ContentUriResolutionSanitizer
36
+ }
37
+
38
+ predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
39
+ any ( ContentUriResolutionAdditionalTaintStep s ) .step ( node1 , node2 )
40
+ }
41
+ }
42
+
43
+ /** Taint-tracking flow to find paths from remote sources to content URI resolutions. */
44
+ module UnsafeContentResolutionFlow = TaintTracking:: Make< UnsafeContentResolutionConf > ;
0 commit comments