Description of the issue
com.google.gson.model.yml is missing some constructors and methods that cause some security vulnerabilities to be missed by CodeQL.
- The com.google.gson.stream.JsonReader and com.google.gson.stream.JsonWriter constructors. CodeQL already supports the
Gson.newJsonReader and Gson.newJsonWriter helper methods, but not the lower level direct instantiation.
- The
getAsJsonArray, getAsJsonObject, and getAsJsonPrimitive overloads on com.google.gson.JsonObject that accept a String as argument 0 are missing. These are helper methods that can access a child property directly as a GSON type. CodeQL already supports these methods without arguments on the base JsonElement type.
- The
parseReader and parseString methods on com.google.gson.JsonParser. These are lower level functions that directly parse JSON and allow it to be traversed.
These were discovered by using the new Visual Studio Code Model Editor plugin and uncovered an issue or two in our code. Shout out to the team for writing that new UI - it's a fantastic tool!
Description of the issue
com.google.gson.model.yml is missing some constructors and methods that cause some security vulnerabilities to be missed by CodeQL.
Gson.newJsonReaderandGson.newJsonWriterhelper methods, but not the lower level direct instantiation.getAsJsonArray,getAsJsonObject, andgetAsJsonPrimitiveoverloads on com.google.gson.JsonObject that accept a String as argument 0 are missing. These are helper methods that can access a child property directly as a GSON type. CodeQL already supports these methods without arguments on the baseJsonElementtype.parseReaderandparseStringmethods on com.google.gson.JsonParser. These are lower level functions that directly parse JSON and allow it to be traversed.These were discovered by using the new Visual Studio Code Model Editor plugin and uncovered an issue or two in our code. Shout out to the team for writing that new UI - it's a fantastic tool!