File tree Expand file tree Collapse file tree
src/semmle/code/java/frameworks
test/library-tests/frameworks/javax-json Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ private class FlowSummaries extends SummaryModelCsv {
8686 "JsonObjectBuilder;false;addAll;;;Argument[-1];ReturnValue;value" ,
8787 "JsonObjectBuilder;false;addNull;;;Argument[-1];ReturnValue;value" ,
8888 "JsonObjectBuilder;false;build;;;Argument[-1];ReturnValue;taint" ,
89+ "JsonObjectBuilder;false;remove;;;Argument[-1];ReturnValue;value" ,
8990 "JsonParserFactory;false;createParser;;;Argument[0];ReturnValue;taint" ,
9091 "JsonPatch;false;apply;;;Argument[-1];ReturnValue;taint" ,
9192 "JsonPatch;false;apply;;;Argument[0];ReturnValue;taint" ,
Original file line number Diff line number Diff line change @@ -1030,6 +1030,13 @@ public void test() {
10301030 out = in .build ();
10311031 sink (out ); // $hasTaintFlow
10321032 }
1033+ {
1034+ // "jakarta.json;JsonObjectBuilder;false;remove;;;Argument[-1];ReturnValue;value"
1035+ jakarta .json .JsonObjectBuilder out = null ;
1036+ jakarta .json .JsonObjectBuilder in = (jakarta .json .JsonObjectBuilder )source ();
1037+ out = in .remove (null );
1038+ sink (out ); // $hasValueFlow
1039+ }
10331040 {
10341041 // "jakarta.json;JsonPatch;false;apply;;;Argument[-1];ReturnValue;taint"
10351042 jakarta .json .JsonStructure out = null ;
@@ -2210,6 +2217,13 @@ public void test() {
22102217 out = in .build ();
22112218 sink (out ); // $hasTaintFlow
22122219 }
2220+ {
2221+ // "javax.json;JsonObjectBuilder;false;remove;;;Argument[-1];ReturnValue;value"
2222+ javax .json .JsonObjectBuilder out = null ;
2223+ javax .json .JsonObjectBuilder in = (javax .json .JsonObjectBuilder )source ();
2224+ out = in .remove (null );
2225+ sink (out ); // $hasValueFlow
2226+ }
22132227 {
22142228 // "javax.json;JsonPatch;false;apply;;;Argument[-1];ReturnValue;taint"
22152229 javax .json .JsonStructure out = null ;
You can’t perform that action at this time.
0 commit comments