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
1515/**
1616 * A taint configuration for tainted data reaching any node.
1717 */
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 }
2020
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 ( ) }
2422}
2523
24+ module TaintReachFlow = TaintTracking:: Make< TaintReachConfig > ;
25+
2626/**
2727 * Gets the total number of dataflow nodes that taint reaches (from any source).
2828 */
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 ) ) }
3230
3331/**
3432 * Gets the proportion of dataflow nodes that taint reaches (from any source),
You can’t perform that action at this time.
0 commit comments