File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,17 @@ import internal.TaintMetrics
12
12
import codeql.ruby.DataFlow
13
13
import codeql.ruby.TaintTracking
14
14
15
- class BasicTaintConfiguration extends TaintTracking :: Configuration {
16
- BasicTaintConfiguration ( ) { this = "BasicTaintConfiguration" }
15
+ private module BasicTaintConfig implements DataFlow :: ConfigSig {
16
+ predicate isSource ( DataFlow :: Node node ) { node = relevantTaintSource ( _ ) }
17
17
18
- override predicate isSource ( DataFlow:: Node node ) { node = relevantTaintSource ( _) }
19
-
20
- override predicate isSink ( DataFlow:: Node node ) {
18
+ predicate isSink ( DataFlow:: Node node ) {
21
19
// To reduce noise from synthetic nodes, only count nodes that have an associated expression.
22
20
exists ( node .asExpr ( ) .getExpr ( ) )
23
21
}
24
22
}
25
23
24
+ private module BasicTaintFlow = TaintTracking:: Global< BasicTaintConfig > ;
25
+
26
26
from DataFlow:: Node node
27
- where any ( BasicTaintConfiguration cfg ) . hasFlow ( _, node )
27
+ where BasicTaintFlow :: flow ( _, node )
28
28
select node , "Tainted node"
You can’t perform that action at this time.
0 commit comments