File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
lib/semmle/code/java/dataflow/internal
test/library-tests/dataflow/collections Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,9 @@ private class ContainerFlowSummaries extends SummaryModelCsv {
244
244
"java.util;Properties;true;getProperty;(String);;Argument[-1].MapValue;ReturnValue;value;manual" ,
245
245
"java.util;Properties;true;getProperty;(String,String);;Argument[-1].MapValue;ReturnValue;value;manual" ,
246
246
"java.util;Properties;true;getProperty;(String,String);;Argument[1];ReturnValue;value;manual" ,
247
+ "java.util;Properties;true;setProperty;(String,String);;Argument[-1].MapValue;ReturnValue;value;manual" ,
248
+ "java.util;Properties;true;setProperty;(String,String);;Argument[0];Argument[-1].MapKey;value;manual" ,
249
+ "java.util;Properties;true;setProperty;(String,String);;Argument[1];Argument[-1].MapValue;value;manual" ,
247
250
"java.util;Scanner;true;Scanner;;;Argument[0];Argument[-1];taint;manual" ,
248
251
"java.util;Scanner;true;findInLine;;;Argument[-1];ReturnValue;taint;manual" ,
249
252
"java.util;Scanner;true;findWithinHorizon;;;Argument[-1];ReturnValue;taint;manual" ,
Original file line number Diff line number Diff line change @@ -88,4 +88,11 @@ public void run4() {
88
88
Properties clean = new Properties ();
89
89
sink (clean .getProperty ("key" , tainted )); // Flow
90
90
}
91
+
92
+ public void run5 () {
93
+ Properties p = new Properties ();
94
+ p .setProperty ("key" , tainted );
95
+ sink (p .getProperty ("key" )); // Flow
96
+ sink (p .getProperty ("key" , "defaultValue" )); // Flow
97
+ }
91
98
}
You can’t perform that action at this time.
0 commit comments