File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
cpp/ql/lib/semmle/code/cpp/models/interfaces Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Provides classes for modeling functions that execute new programs by
3
+ * interpreting string data as shell commands. To use this QL library, create
4
+ * a QL class extending `CommandExecutionFunction` with a characteristic
5
+ * predicate that selects the function or set of functions you are modeling.
6
+ * Within that class, override the `hasCommandArgument` predicate to indicate
7
+ * which parameters are interpreted as shell commands.
8
+ */
9
+
1
10
import cpp
2
11
import FunctionInputsAndOutputs
3
12
import semmle.code.cpp.models.Models
4
13
14
+ /**
15
+ * A function, such as `exec` or `popen` that starts a new process by
16
+ * interpreting a string as a shell command.
17
+ */
5
18
abstract class CommandExecutionFunction extends Function {
19
+ /**
20
+ * Holds if `input` is interpreted as a shell command.
21
+ */
6
22
abstract predicate hasCommandArgument ( FunctionInput input ) ;
7
- }
23
+ }
You can’t perform that action at this time.
0 commit comments