
YodaVC99 (Community Member) asked a question.
After running a static scan; my java code was flagged with CRLF injection flaws. So I modified the logging statements to use a custom class that in turn calls StringEscapeUtils.escapeJava to sanitize the input. But after making the changes & running the scan; it's still flagged with the same issue? What am I doing wrong? Thanks.
.png)
Resolution - After meeting with a Veracode security consultant; we were able to figure out the issue. The reason the scan was still flagging issues was because I was using the latest version of StringEscapeUtils (from commons-text) & that is not a supported version by Veracode. When I switched to org.apache.commons.lang.StringEscapeUtils; the scan worked & didn't flag it as an issue any more. The reason I was using commons-text version is because I believe the commons.lang version is deprecated. Hopefully Veracode will upgrade it's scanning to support the newest version.