File tree Expand file tree Collapse file tree
cpp/ql/lib/semmle/code/cpp/models/interfaces Expand file tree Collapse file tree 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+
110import cpp
211import FunctionInputsAndOutputs
312import semmle.code.cpp.models.Models
413
14+ /**
15+ * A function, such as `exec` or `popen` that starts a new process by
16+ * interpreting a string as a shell command.
17+ */
518abstract class CommandExecutionFunction extends Function {
19+ /**
20+ * Holds if `input` is interpreted as a shell command.
21+ */
622 abstract predicate hasCommandArgument ( FunctionInput input ) ;
7- }
23+ }
You can’t perform that action at this time.
0 commit comments