When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
Hi @BScarboro644374 (Community Member) ,
Yes, replacing CRLF characters does address the concern here and would make it a suitable candidate for a mitigation by design. Veracode Static Analysis is only able to automatically detect your sanitization if it uses one of our supported cleansing functions (https://docs.veracode.com/r/review_cleansers). For more information on how to propose a mitigation, please refer to our Help Center: https://docs.veracode.com/r/improve_mitigation.
I would recommend a slight adjustment to your approach. Instead of replacing CRLF characters with underscores, it might be a better idea to escape them by pre-pending a backslash. This would make sure that you can still see if someone tries to mess with your log files (i.e. preserving intend for auditing) without actually allowing them to do it. For more information on how to deal with CWE 117, please refer to the following article: https://community.veracode.com/s/article/How-to-Fix-CWE-117-Improper-Output-Neutralization-for-Logs
Thank you,
Florian Walter