We have integrated Checkmarx static code analyzer tool in Azure DevOps Pipeline. While running our pipeline, we are getting "Deserialization of Untrusted Data" error with high risk in below lines of code. Could you please help me to resolve the issue?
C# Code:
using System.Text.Json;
string reqBodyParams = await new StreamReader(request.Body).ReadToEndAsync();
var requestData = JsonSerializer.Deserialize<CalcRequestBody>(reqBodyParams);
CalcRequestBody Class:
public class CalcRequestBody
{
public string CalcFormula { get; set; }
public string UserName { get; set; }
}