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 {
409
409
"org.apache.commons.lang3;ObjectUtils;false;clone;;;Argument;ReturnValue;value" ,
410
410
"org.apache.commons.lang3;ObjectUtils;false;cloneIfPossible;;;Argument;ReturnValue;value" ,
411
411
"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" ,
412
414
"org.apache.commons.lang3;ObjectUtils;false;defaultIfNull;;;Argument;ReturnValue;value" ,
413
415
"org.apache.commons.lang3;ObjectUtils;false;firstNonNull;;;Argument;ReturnValue;taint" ,
414
416
"org.apache.commons.lang3;ObjectUtils;false;getIfNull;;;Argument[0];ReturnValue;value" ,
Original file line number Diff line number Diff line change 3
3
public class ObjectUtilsTest {
4
4
String taint () { return "tainted" ; }
5
5
6
+ private static class IntSource {
7
+ static int taint () { return 0 ; }
8
+ }
9
+
6
10
void sink (Object o ) {}
7
11
8
12
void test () throws Exception {
9
13
sink (ObjectUtils .clone (taint ())); // $hasTaintFlow=y $hasValueFlow=y
10
14
sink (ObjectUtils .cloneIfPossible (taint ())); // $hasTaintFlow=y $hasValueFlow=y
11
15
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
12
18
sink (ObjectUtils .defaultIfNull (taint (), null )); // $hasTaintFlow=y $hasValueFlow=y
13
19
sink (ObjectUtils .defaultIfNull (null , taint ())); // $hasTaintFlow=y $hasValueFlow=y
14
20
sink (ObjectUtils .firstNonNull (taint (), null , null )); // $hasTaintFlow=y $MISSING:hasValueFlow=y
You can’t perform that action at this time.
0 commit comments