11/**
2- * Provides a taint tracking configuration for reasoning about command-injection
3- * vulnerabilities (CWE-078).
2+ * Provides a taint tracking configuration for reasoning about
3+ * command-injection vulnerabilities (CWE-078).
4+ *
5+ * Note, for performance reasons: only import this file if
6+ * `CommandInjection::Configuration` is needed, otherwise
7+ * `CommandInjectionCustomizations` should be imported instead.
48 */
59
610import javascript
7- import semmle.javascript.security.dataflow.RemoteFlowSources
811
912module CommandInjection {
10- /**
11- * A data flow source for command-injection vulnerabilities.
12- */
13- abstract class Source extends DataFlow:: Node { }
14-
15- /**
16- * A data flow sink for command-injection vulnerabilities.
17- */
18- abstract class Sink extends DataFlow:: Node { }
19-
20- /**
21- * A sanitizer for command-injection vulnerabilities.
22- */
23- abstract class Sanitizer extends DataFlow:: Node { }
13+ import CommandInjectionCustomizations:: CommandInjection
2414
2515 /**
2616 * A taint-tracking configuration for reasoning about command-injection vulnerabilities.
@@ -45,18 +35,6 @@ module CommandInjection {
4535 override predicate isSanitizer ( DataFlow:: Node node ) { node instanceof Sanitizer }
4636 }
4737
48- /** A source of remote user input, considered as a flow source for command injection. */
49- class RemoteFlowSourceAsSource extends Source {
50- RemoteFlowSourceAsSource ( ) { this instanceof RemoteFlowSource }
51- }
52-
53- /**
54- * A command argument to a function that initiates an operating system command.
55- */
56- class SystemCommandExecutionSink extends Sink , DataFlow:: ValueNode {
57- SystemCommandExecutionSink ( ) { this = any ( SystemCommandExecution sys ) .getACommandArgument ( ) }
58- }
59-
6038 /**
6139 * Auxiliary data flow configuration for tracking string literals that look like they
6240 * may refer to an operating system shell, and array literals that may end up being
0 commit comments