File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
swift/ql/src/queries/Summary Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -15,20 +15,18 @@ import codeql.swift.dataflow.TaintTracking
15
15
/**
16
16
* A taint configuration for tainted data reaching any node.
17
17
*/
18
- class TaintReachConfig extends TaintTracking :: Configuration {
19
- TaintReachConfig ( ) { this = "TaintReachConfig" }
18
+ module TaintReachConfig implements DataFlow :: ConfigSig {
19
+ predicate isSource ( DataFlow :: Node node ) { node instanceof FlowSource }
20
20
21
- override predicate isSource ( DataFlow:: Node node ) { node instanceof FlowSource }
22
-
23
- override predicate isSink ( DataFlow:: Node node ) { any ( ) }
21
+ predicate isSink ( DataFlow:: Node node ) { any ( ) }
24
22
}
25
23
24
+ module TaintReachFlow = TaintTracking:: Make< TaintReachConfig > ;
25
+
26
26
/**
27
27
* Gets the total number of dataflow nodes that taint reaches (from any source).
28
28
*/
29
- int taintedNodesCount ( ) {
30
- exists ( TaintReachConfig config | result = count ( DataFlow:: Node n | config .hasFlowTo ( n ) ) )
31
- }
29
+ int taintedNodesCount ( ) { result = count ( DataFlow:: Node n | TaintReachFlow:: hasFlowTo ( n ) ) }
32
30
33
31
/**
34
32
* Gets the proportion of dataflow nodes that taint reaches (from any source),
You can’t perform that action at this time.
0 commit comments