11/**
22 * Provides a taint-tracking configuration for detecting regexp injection vulnerabilities.
33 *
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.
67 */
78
89import codeql.ruby.DataFlow
@@ -12,8 +13,9 @@ import codeql.ruby.dataflow.BarrierGuards
1213
1314/**
1415 * A taint-tracking configuration for detecting regexp injection vulnerabilities.
16+ * DEPRECATED: Use `RegExpInjectionFlow`
1517 */
16- class Configuration extends TaintTracking:: Configuration {
18+ deprecated class Configuration extends TaintTracking:: Configuration {
1719 Configuration ( ) { this = "RegExpInjection" }
1820
1921 override predicate isSource ( DataFlow:: Node source ) { source instanceof RegExpInjection:: Source }
@@ -26,3 +28,16 @@ class Configuration extends TaintTracking::Configuration {
2628
2729 override predicate isSanitizer ( DataFlow:: Node node ) { node instanceof RegExpInjection:: Sanitizer }
2830}
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