Java: Add flow out of Map and List

This commit is contained in:
lcartey@github.com
2020-05-15 17:27:07 +01:00
parent 6de2b93f3a
commit 7c4251deac

View File

@@ -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 {