mirror of
https://github.com/github/codeql.git
synced 2026-04-22 23:35:14 +02:00
Merge pull request #13409 from atorralba/atorralba/java/fix-gson-models
Java: Fix more problems in the Gson models
This commit is contained in:
@@ -38,11 +38,11 @@ extensions:
|
||||
- ["com.google.gson", "JsonObject", True, "add", "", "", "Argument[0]", "Argument[this].MapKey", "value", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "add", "", "", "Argument[1]", "Argument[this].MapValue", "value", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "addProperty", "(String,String)", "", "Argument[0]", "Argument[this].MapKey", "value", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "addProperty", "(String,String)", "", "Argument[1]", "Argument[this].MapValue", "value", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "addProperty", "(String,String)", "", "Argument[1]", "Argument[this].MapValue", "taint", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "asMap", "", "", "Argument[this].MapKey", "ReturnValue.MapKey", "value", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "asMap", "", "", "Argument[this].MapValue", "ReturnValue.MapValue", "value", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "entrySet", "", "", "Argument[this].MapKey", "ReturnValue.Element.MapKey", "value", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "entrySet", "", "", "Argument[this].MapKey", "ReturnValue.Element.MapValue", "value", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "entrySet", "", "", "Argument[this].MapValue", "ReturnValue.Element.MapValue", "value", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "get", "", "", "Argument[this].MapValue", "ReturnValue", "value", "manual"]
|
||||
- ["com.google.gson", "JsonObject", True, "keySet", "", "", "Argument[this].MapKey", "ReturnValue.Element", "value", "manual"]
|
||||
- ["com.google.gson", "JsonPrimitive", True, "JsonPrimitive", "(Character)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
|
||||
|
||||
@@ -407,51 +407,51 @@ public class Test {
|
||||
sink(getMapKeyDefault(out)); // $ hasValueFlow
|
||||
}
|
||||
{
|
||||
// "com.google.gson;JsonObject;true;addProperty;(String,String);;Argument[1];Argument[this].MapValue;value;manual"
|
||||
// "com.google.gson;JsonObject;true;addProperty;(String,String);;Argument[1];Argument[this].MapValue;taint;manual"
|
||||
JsonObject out = null;
|
||||
String in = (String)source();
|
||||
out.addProperty((String)null, in);
|
||||
sink(getMapValueDefault(out)); // $ hasValueFlow
|
||||
sink(getMapValueDefault(out)); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "com.google.gson;JsonObject;true;asMap;;;Argument[this].MapKey;ReturnValue.MapKey;value;manual"
|
||||
Map out = null;
|
||||
JsonObject in = (JsonObject)newWithMapKeyDefault((String) source());
|
||||
JsonObject in = newWithMapKeyDefault((String) source());
|
||||
out = in.asMap();
|
||||
sink(getMapKey(out)); // $ hasValueFlow
|
||||
}
|
||||
{
|
||||
// "com.google.gson;JsonObject;true;asMap;;;Argument[this].MapValue;ReturnValue.MapValue;value;manual"
|
||||
Map out = null;
|
||||
JsonObject in = (JsonObject)newWithMapValueDefault((JsonElement) source());
|
||||
JsonObject in = newWithMapValueDefault((JsonElement) source());
|
||||
out = in.asMap();
|
||||
sink(getMapValue(out)); // $ hasValueFlow
|
||||
}
|
||||
{
|
||||
// "com.google.gson;JsonObject;true;entrySet;;;Argument[this].MapKey;ReturnValue.Element.MapKey;value;manual"
|
||||
Set<Map.Entry<String,JsonElement>> out = null;
|
||||
JsonObject in = (JsonObject)newWithMapKeyDefault((String) source());
|
||||
JsonObject in = newWithMapKeyDefault((String) source());
|
||||
out = in.entrySet();
|
||||
sink(getMapKeyDefault(getElement(out))); // $ hasValueFlow
|
||||
}
|
||||
{
|
||||
// "com.google.gson;JsonObject;true;entrySet;;;Argument[this].MapKey;ReturnValue.Element.MapValue;value;manual"
|
||||
// "com.google.gson;JsonObject;true;entrySet;;;Argument[this].MapValue;ReturnValue.Element.MapValue;value;manual"
|
||||
Set<Map.Entry<String,JsonElement>> out = null;
|
||||
JsonObject in = (JsonObject) newWithMapKeyDefault((String) source());
|
||||
JsonObject in = newWithMapValueDefault((JsonElement) source());
|
||||
out = in.entrySet();
|
||||
sink(getMapValueDefault(getElement(out))); // $ hasValueFlow
|
||||
}
|
||||
{
|
||||
// "com.google.gson;JsonObject;true;get;;;Argument[this].MapValue;ReturnValue;value;manual"
|
||||
JsonElement out = null;
|
||||
JsonObject in = (JsonObject)newWithMapValueDefault((JsonElement) source());
|
||||
JsonObject in = newWithMapValueDefault((JsonElement) source());
|
||||
out = in.get(null);
|
||||
sink(out); // $ hasValueFlow
|
||||
}
|
||||
{
|
||||
// "com.google.gson;JsonObject;true;keySet;;;Argument[this].MapKey;ReturnValue.Element;value;manual"
|
||||
Set out = null;
|
||||
JsonObject in = (JsonObject)newWithMapKeyDefault((String) source());
|
||||
JsonObject in = newWithMapKeyDefault((String) source());
|
||||
out = in.keySet();
|
||||
sink(getElement(out)); // $ hasValueFlow
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user