Closed
Description
Description of the false positive
Code using concatenation with a "?" on the left is recognized as sanitized, but the same code using string interpolation or string.Format instead of concatenation generates an alert.
Code samples or links to source code
Code with no alerts:
var userInput = Request.QueryString["Item"];
Response.Redirect("Home.aspx?Item=" + userInput);
Equivalent code that generates alerts:
var userInput = Request.QueryString["Item"];
Response.Redirect(string.Format("Home.aspx?Item={0}", userInput));
var userInput = Request.QueryString["Item"];
Response.Redirect($"Home.aspx?Item={userInput}");
URL to the alert on GitHub code scanning (optional)
Alert is in a private repository.