@@ -5,8 +5,12 @@ import semmle.code.java.dataflow.FlowSources
55import semmle.code.java.dataflow.TaintTracking
66import semmle.code.java.security.UnsafeContentUriResolution
77
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 {
1014 UnsafeContentResolutionConf ( ) { this = "UnsafeContentResolutionConf" }
1115
1216 override predicate isSource ( DataFlow:: Node src ) { src instanceof RemoteFlowSource }
@@ -21,3 +25,20 @@ class UnsafeContentResolutionConf extends TaintTracking::Configuration {
2125 any ( ContentUriResolutionAdditionalTaintStep s ) .step ( node1 , node2 )
2226 }
2327}
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