зеркало из https://github.com/github/codeql.git
Java: model java.util.Arrays
This commit is contained in:
Родитель
c629f6b13a
Коммит
a07af79fff
|
@ -180,6 +180,12 @@ private predicate taintPreservingArgumentToMethod(Method method, int arg) {
|
|||
or
|
||||
method.hasName(["nCopies", "singletonMap"]) and arg = 1
|
||||
)
|
||||
or
|
||||
method.getDeclaringType().hasQualifiedName("java.util", "Arrays") and
|
||||
(
|
||||
method.hasName(["copyOf", "copyOfRange", "deepToString", "spliterator", "stream", "toString"]) and
|
||||
arg = 0
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -195,6 +201,13 @@ private predicate taintPreservingArgToArg(Method method, int input, int output)
|
|||
or
|
||||
method.hasName("replaceAll") and input = 2 and output = 0
|
||||
)
|
||||
or
|
||||
method.getDeclaringType().hasQualifiedName("java.util", "Arrays") and
|
||||
(
|
||||
method.hasName(["fill", "parallelPrefix", "parallelSetAll", "setAll"]) and
|
||||
output = 0 and
|
||||
input = method.getNumberOfParameters() - 1
|
||||
)
|
||||
}
|
||||
|
||||
private predicate argToQualifierStep(Expr tracked, Expr sink) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче