33 * command-injection vulnerabilities (CWE-078).
44 *
55 * Note, for performance reasons: only import this file if
6- * `CommandInjection::Configuration ` is needed, otherwise
6+ * `CommandInjectionFlow ` is needed, otherwise
77 * `CommandInjectionCustomizations` should be imported instead.
88 */
99
@@ -15,8 +15,9 @@ import codeql.ruby.dataflow.BarrierGuards
1515
1616/**
1717 * A taint-tracking configuration for reasoning about command-injection vulnerabilities.
18+ * DEPRECATED: Use `CommandInjectionFlow` instead
1819 */
19- class Configuration extends TaintTracking:: Configuration {
20+ deprecated class Configuration extends TaintTracking:: Configuration {
2021 Configuration ( ) { this = "CommandInjection" }
2122
2223 override predicate isSource ( DataFlow:: Node source ) { source instanceof Source }
@@ -29,3 +30,20 @@ class Configuration extends TaintTracking::Configuration {
2930 node instanceof StringConstArrayInclusionCallBarrier
3031 }
3132}
33+
34+ private module Config implements DataFlow:: ConfigSig {
35+ predicate isSource ( DataFlow:: Node source ) { source instanceof Source }
36+
37+ predicate isSink ( DataFlow:: Node sink ) { sink instanceof Sink }
38+
39+ predicate isBarrier ( DataFlow:: Node node ) {
40+ node instanceof Sanitizer or
41+ node instanceof StringConstCompareBarrier or
42+ node instanceof StringConstArrayInclusionCallBarrier
43+ }
44+ }
45+
46+ /**
47+ * Taint-tracking for reasoning about command-injection vulnerabilities.
48+ */
49+ module CommandInjectionFlow = TaintTracking:: Global< Config > ;
0 commit comments