Our application is being dinged several hundred times CWE-ID 100 "flaws" related to Technology-Specific Input Validation Problems according to Veracode.
According to their docs, the remediation is to check the ModelState.IsValid
property on a model before using it. We do this on every controller action yet we are still dinged. An example controller action follows.
public async Task<ActionResult> DeliverySummary (ReportsViewModel Model)
{
if (ModelState.IsValid)
{
/* Other processing occurs here */
//finally return View
return View(Model);
}
else
{
return View();
}
}
We have the System.ComponentModel.DataAnnotations
on our model properties.
Has anyone ever encountered this?