The below code is for logging sVal value. So I am getting Veracode issue of CWE-117: Improper Output Neutralization for Logs. Could anyone help on this to resolve.
public void AddTracing(Dictionary<string, string> keyValueCollection, Exception?exceptionDetails)
{
foreach (KeyValuePair<string, string> dicItem in keyValueCollection)
{
string sVal = dicItem.Value.Replace("\n", "___").Replace("\r", "__");
if (dicItem.Key.Equals(Constant.LogMessage))
{
_logHelper.LogInformation("SVal", sVal);
}
}
}