Hi,
I'm tasked with fixing vulnerabilities found by Veracode and a major issue is
Improper Output Neutralization for Logs (CWE ID 117)
The app is using SLF4J and logback e.g.
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private final Logger logger = LoggerFactory.getLogger(getClass());
logger.info("Getting transaction fee amount for accountId : {}, programId : {}, transactionType : {} and amount : {}", account.getAccountId(),
program.getProgramId(), transactionType, txnAmount);
Following online resources I added a ESAPI.properties file and replaced the ESAPI.Logger line to be:
ESAPI.Logger=org.owasp.esapi.logging.slf4j.Slf4JLogFactory
And added the library dependency implementation 'org.owasp.esapi:esapi:2.2.3.1' to build.gradle
However I can't tell if it is now using ESAPI I set breakpoints in the
org.owasp.esapi.logging.slf4j.Slf4JLogFactory class in the getLogger methods but the code doesn't appear to stop.
Any ideas om what I might be doing wrong?
Thanks, Jason