mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Update docs
This commit is contained in:
@@ -178,7 +178,7 @@ class TypeFile extends Class {
|
||||
|
||||
// --- Standard methods ---
|
||||
/**
|
||||
* Any of the methods named `command` on class `java.lang.ProcessBuilder`.
|
||||
* Any constructor of class `java.lang.ProcessBuilder`.
|
||||
*/
|
||||
class ProcessBuilderConstructor extends Constructor, ExecCallable {
|
||||
ProcessBuilderConstructor() { this.getDeclaringType() instanceof TypeProcessBuilder }
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
import semmle.code.java.Type
|
||||
import semmle.code.java.security.ExternalProcess
|
||||
|
||||
library class TypeCommandLine extends Class {
|
||||
/** The class `org.apache.commons.exec.CommandLine`. */
|
||||
private class TypeCommandLine extends Class {
|
||||
TypeCommandLine() { hasQualifiedName("org.apache.commons.exec", "CommandLine") }
|
||||
}
|
||||
|
||||
library class MethodCommandLineParse extends Method, ExecCallable {
|
||||
/** The `parse()` method of the class `org.apache.commons.exec.CommandLine`. */
|
||||
private class MethodCommandLineParse extends Method, ExecCallable {
|
||||
MethodCommandLineParse() {
|
||||
getDeclaringType() instanceof TypeCommandLine and
|
||||
hasName("parse")
|
||||
@@ -15,7 +17,8 @@ library class MethodCommandLineParse extends Method, ExecCallable {
|
||||
override int getAnExecutedArgument() { result = 0 }
|
||||
}
|
||||
|
||||
library class MethodCommandLineAddArguments extends Method, ExecCallable {
|
||||
/** The `addArguments()` method of the class `org.apache.commons.exec.CommandLine`. */
|
||||
private class MethodCommandLineAddArguments extends Method, ExecCallable {
|
||||
MethodCommandLineAddArguments() {
|
||||
getDeclaringType() instanceof TypeCommandLine and
|
||||
hasName("addArguments")
|
||||
|
||||
@@ -4,9 +4,12 @@ import semmle.code.java.JDK
|
||||
import semmle.code.java.frameworks.apache.Exec
|
||||
|
||||
/**
|
||||
* A method that executes a command.
|
||||
* A callable that executes a command.
|
||||
*/
|
||||
abstract class ExecCallable extends Callable {
|
||||
/**
|
||||
* Gets the index of an argument that will be part of the command that is executed.
|
||||
*/
|
||||
abstract int getAnExecutedArgument();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user