Add missing CollectionUtils model

This commit is contained in:
Chris Smowton
2021-06-29 11:44:29 +01:00
parent 659478cc39
commit 5769f4718f
2 changed files with 8 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ private class FlowSummaries extends SummaryModelCsv {
"org.springframework.util;Base64Utils;false;encodeToUrlSafeString;;;Argument[0];ReturnValue;taint",
"org.springframework.util;Base64Utils;false;encodeUrlSafe;;;Argument[0];ReturnValue;taint",
"org.springframework.util;CollectionUtils;false;arrayToList;;;ArrayElement of Argument[0];Element of ReturnValue;value",
"org.springframework.util;CollectionUtils;false;findFirstMatch;;;Element of Argument[0];ReturnValue;value",
"org.springframework.util;CollectionUtils;false;findValueOfType;;;Element of Argument[0];ReturnValue;value",
"org.springframework.util;CollectionUtils;false;firstElement;;;Element of Argument[0];ReturnValue;value",
"org.springframework.util;CollectionUtils;false;lastElement;;;Element of Argument[0];ReturnValue;value",

View File

@@ -198,6 +198,13 @@ public class Test {
out = CollectionUtils.arrayToList(in);
sink(getElement(out)); // $hasValueFlow
}
{
// "org.springframework.util;CollectionUtils;false;findFirstMatch;;;Element of Argument[0];ReturnValue;value"
Object out = null;
Collection in = List.of(source());
out = CollectionUtils.findFirstMatch(in, null);
sink(out); // $hasValueFlow
}
{
// "org.springframework.util;CollectionUtils;false;findValueOfType;;;Element of Argument[0];ReturnValue;value"
Object out = null;