mirror of
https://github.com/github/codeql.git
synced 2026-02-28 21:03:50 +01:00
Java: Add flow out of Map and List
This commit is contained in:
@@ -358,6 +358,17 @@ private predicate taintPreservingQualifierToMethod(Method m) {
|
||||
m = any(GuiceProvider gp).getAnOverridingGetMethod()
|
||||
or
|
||||
m = any(ProtobufMessageLite p).getAGetterMethod()
|
||||
or
|
||||
m instanceof MapMethod and
|
||||
(
|
||||
m.getName().regexpMatch("get|entrySet|keySet|values")
|
||||
)
|
||||
or
|
||||
m.getDeclaringType().getSourceDeclaration().getASourceSupertype*().hasQualifiedName("java.util", "List") and
|
||||
(
|
||||
m.getName().regexpMatch("get|toArray|subList|spliterator|set|iterator|listIterator") or
|
||||
(m.getName().regexpMatch("remove") and not m.getReturnType() instanceof BooleanType)
|
||||
)
|
||||
}
|
||||
|
||||
private class StringReplaceMethod extends Method {
|
||||
|
||||
Reference in New Issue
Block a user