Im trying to do the checkmarx scan for my code. But I'm facing this error : This element’s value then flows through the code without being properly sanitized or validated and is eventually displayed to the user in method .then at line 145 ........ This may enable a Cross-Site-Scripting attack.
Im working with express js in which there is a method that accepts a request and response from server.
function method1(request,response){
const params = request.query; ------> this line gives a vulnerability
}
Pleasee Help me resolve this issue ASAP.Have searched for solutions but there are solns related to java or .net only.. I need solution for node/express js.
Thanks in advance