Skip to content

Commit d3d708b

Browse files
committed
C++: QLDoc for CommandExecution model
1 parent c85cc14 commit d3d708b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
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+
110
import cpp
211
import FunctionInputsAndOutputs
312
import 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+
*/
518
abstract class CommandExecutionFunction extends Function {
19+
/**
20+
* Holds if `input` is interpreted as a shell command.
21+
*/
622
abstract predicate hasCommandArgument(FunctionInput input);
7-
}
23+
}

0 commit comments

Comments
 (0)