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 {
244244 "java.util;Properties;true;getProperty;(String);;Argument[-1].MapValue;ReturnValue;value;manual" ,
245245 "java.util;Properties;true;getProperty;(String,String);;Argument[-1].MapValue;ReturnValue;value;manual" ,
246246 "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" ,
247250 "java.util;Scanner;true;Scanner;;;Argument[0];Argument[-1];taint;manual" ,
248251 "java.util;Scanner;true;findInLine;;;Argument[-1];ReturnValue;taint;manual" ,
249252 "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() {
8888 Properties clean = new Properties ();
8989 sink (clean .getProperty ("key" , tainted )); // Flow
9090 }
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+ }
9198}
You can’t perform that action at this time.
0 commit comments