File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
src/semmle/code/java/frameworks/apache
test/library-tests/frameworks/apache-commons-lang3 Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -409,6 +409,8 @@ private class ApacheObjectUtilsModel extends SummaryModelCsv {
409409 "org.apache.commons.lang3;ObjectUtils;false;clone;;;Argument;ReturnValue;value" ,
410410 "org.apache.commons.lang3;ObjectUtils;false;cloneIfPossible;;;Argument;ReturnValue;value" ,
411411 "org.apache.commons.lang3;ObjectUtils;false;CONST;;;Argument;ReturnValue;value" ,
412+ "org.apache.commons.lang3;ObjectUtils;false;CONST_BYTE;;;Argument;ReturnValue;value" ,
413+ "org.apache.commons.lang3;ObjectUtils;false;CONST_SHORT;;;Argument;ReturnValue;value" ,
412414 "org.apache.commons.lang3;ObjectUtils;false;defaultIfNull;;;Argument;ReturnValue;value" ,
413415 "org.apache.commons.lang3;ObjectUtils;false;firstNonNull;;;Argument;ReturnValue;taint" ,
414416 "org.apache.commons.lang3;ObjectUtils;false;getIfNull;;;Argument[0];ReturnValue;value" ,
Original file line number Diff line number Diff line change 33public class ObjectUtilsTest {
44 String taint () { return "tainted" ; }
55
6+ private static class IntSource {
7+ static int taint () { return 0 ; }
8+ }
9+
610 void sink (Object o ) {}
711
812 void test () throws Exception {
913 sink (ObjectUtils .clone (taint ())); // $hasTaintFlow=y $hasValueFlow=y
1014 sink (ObjectUtils .cloneIfPossible (taint ())); // $hasTaintFlow=y $hasValueFlow=y
1115 sink (ObjectUtils .CONST (taint ())); // $hasTaintFlow=y $hasValueFlow=y
16+ sink (ObjectUtils .CONST_SHORT (IntSource .taint ())); // $hasTaintFlow=y $hasValueFlow=y
17+ sink (ObjectUtils .CONST_BYTE (IntSource .taint ())); // $hasTaintFlow=y $hasValueFlow=y
1218 sink (ObjectUtils .defaultIfNull (taint (), null )); // $hasTaintFlow=y $hasValueFlow=y
1319 sink (ObjectUtils .defaultIfNull (null , taint ())); // $hasTaintFlow=y $hasValueFlow=y
1420 sink (ObjectUtils .firstNonNull (taint (), null , null )); // $hasTaintFlow=y $MISSING:hasValueFlow=y
You can’t perform that action at this time.
0 commit comments