Skip to content

Commit 4b8d4f5

Browse files
committed
Update docs
1 parent e448dcb commit 4b8d4f5

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

java/ql/src/semmle/code/java/JDK.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class TypeFile extends Class {
178178

179179
// --- Standard methods ---
180180
/**
181-
* Any of the methods named `command` on class `java.lang.ProcessBuilder`.
181+
* Any constructor of class `java.lang.ProcessBuilder`.
182182
*/
183183
class ProcessBuilderConstructor extends Constructor, ExecCallable {
184184
ProcessBuilderConstructor() { this.getDeclaringType() instanceof TypeProcessBuilder }

java/ql/src/semmle/code/java/frameworks/apache/Exec.qll

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
import semmle.code.java.Type
33
import semmle.code.java.security.ExternalProcess
44

5-
library class TypeCommandLine extends Class {
5+
/** The class `org.apache.commons.exec.CommandLine`. */
6+
private class TypeCommandLine extends Class {
67
TypeCommandLine() { hasQualifiedName("org.apache.commons.exec", "CommandLine") }
78
}
89

9-
library class MethodCommandLineParse extends Method, ExecCallable {
10+
/** The `parse()` method of the class `org.apache.commons.exec.CommandLine`. */
11+
private class MethodCommandLineParse extends Method, ExecCallable {
1012
MethodCommandLineParse() {
1113
getDeclaringType() instanceof TypeCommandLine and
1214
hasName("parse")
@@ -15,7 +17,8 @@ library class MethodCommandLineParse extends Method, ExecCallable {
1517
override int getAnExecutedArgument() { result = 0 }
1618
}
1719

18-
library class MethodCommandLineAddArguments extends Method, ExecCallable {
20+
/** The `addArguments()` method of the class `org.apache.commons.exec.CommandLine`. */
21+
private class MethodCommandLineAddArguments extends Method, ExecCallable {
1922
MethodCommandLineAddArguments() {
2023
getDeclaringType() instanceof TypeCommandLine and
2124
hasName("addArguments")

java/ql/src/semmle/code/java/security/ExternalProcess.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ import semmle.code.java.JDK
44
import semmle.code.java.frameworks.apache.Exec
55

66
/**
7-
* A method that executes a command.
7+
* A callable that executes a command.
88
*/
99
abstract class ExecCallable extends Callable {
10+
/**
11+
* Gets the index of an argument that will be part of the command that is executed.
12+
*/
1013
abstract int getAnExecutedArgument();
1114
}
1215

0 commit comments

Comments
 (0)