It appears that in your case, Fortify complains that you are using json from an untrusted source, this is what the Fortify documentation says:
The semantics of documents and JSON messages can be changed if the application creates JSON from unapproved input. In a relatively benign case, an attacker can insert extraneous elements that cause the application to throw an exception when parsing a JSON document or request. In a more serious case, for example, using JSON injection, an attacker can insert extraneous elements that allow the predictable manipulation of business-critical values ββin a document or JSON request.
If you get json from a web service that you own, you can probably ignore the Fortify warning. However, keep in mind that you are calling JArray.Parse() on the input and assume that it will be a valid array, but if it is not, you will get a JsonReaderException . Also, you really don't check JSON for a schema, please see the JSON.NET example to find out how to specify a JSON schema.
Honestly, I would be interested to know how Fortify expects it to be able to verify the JSON received from third-party web services.
source share