Add models for commons lang/text's Str[ing]Lookup class

This commit is contained in:
Chris Smowton
2021-02-18 11:43:48 +00:00
parent 1580d23b2b
commit f749c31136
7 changed files with 319 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import org.apache.commons.lang3.text.StrLookup;
import java.util.HashMap;
import java.util.Map;
class StrLookupTest {
String taint() { return "tainted"; }
void sink(Object o) {}
void test() throws Exception {
Map<String, String> map = new HashMap<String, String>();
map.put("key", taint());
StrLookup<String> lookup = StrLookup.mapLookup(map);
sink(lookup.lookup("key")); // $hasTaintFlow=y
}
}