1
1
/**
2
2
* Provides a taint-tracking configuration for detecting regexp injection vulnerabilities.
3
3
*
4
- * Note, for performance reasons: only import this file if `Configuration` is needed,
5
- * otherwise `RegExpInjectionCustomizations` should be imported instead.
4
+ * Note, for performance reasons: only import this file if
5
+ * `RegExpInjectionFlow` is needed, otherwise
6
+ * `RegExpInjectionCustomizations` should be imported instead.
6
7
*/
7
8
8
9
import codeql.ruby.DataFlow
@@ -12,8 +13,9 @@ import codeql.ruby.dataflow.BarrierGuards
12
13
13
14
/**
14
15
* A taint-tracking configuration for detecting regexp injection vulnerabilities.
16
+ * DEPRECATED: Use `RegExpInjectionFlow`
15
17
*/
16
- class Configuration extends TaintTracking:: Configuration {
18
+ deprecated class Configuration extends TaintTracking:: Configuration {
17
19
Configuration ( ) { this = "RegExpInjection" }
18
20
19
21
override predicate isSource ( DataFlow:: Node source ) { source instanceof RegExpInjection:: Source }
@@ -26,3 +28,16 @@ class Configuration extends TaintTracking::Configuration {
26
28
27
29
override predicate isSanitizer ( DataFlow:: Node node ) { node instanceof RegExpInjection:: Sanitizer }
28
30
}
31
+
32
+ private module RegExpInjectionConfig implements DataFlow:: ConfigSig {
33
+ predicate isSource ( DataFlow:: Node source ) { source instanceof RegExpInjection:: Source }
34
+
35
+ predicate isSink ( DataFlow:: Node sink ) { sink instanceof RegExpInjection:: Sink }
36
+
37
+ predicate isBarrier ( DataFlow:: Node node ) { node instanceof RegExpInjection:: Sanitizer }
38
+ }
39
+
40
+ /**
41
+ * Taint-tracking for detecting regexp injection vulnerabilities.
42
+ */
43
+ module RegExpInjectionFlow = TaintTracking:: Global< RegExpInjectionConfig > ;
0 commit comments