I have written a custom check in SonarJS to detect persistent Cross-site scripting vulnerabilities in javascript. However, I got a lot false positives and try to improve the code.
I have below two questions:
Does SonarJS support data flow analysis? For example, tracking some value comes from the Ajax response and finally print to the HTML (like
innerHtml
).Do we have any parser in SonarJS plugin to parse the "+" operator? For example, get the part
this.name
from'<input value="' + this.name + '">'
expression.
Regards! Jack Yao