We are getting an error for “Change this code to not construct the URL from user-controlled data.” where we are passing the url for the request as a parameter. The example shows an external endpoint being passed the url. But we use in our internal .dll and all of the inputs are validated before the call. The same issue was discussed in Help SonarCloud with understanding the usage of untrusted and tainted input but there was no setting to control it.
The code sample suggest to validate the url passed.
// Match the incoming URL against a whitelist
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); // Noncompliant
How can I configure that I have already verified the input or how would you suggest to handle this?