refactor the js/xss query to use three flowlabels and one configuration

This commit is contained in:
Erik Krogh Kristensen
2022-03-01 16:29:35 +01:00
parent 87842bb8b7
commit f083e87fa1
7 changed files with 1359 additions and 106 deletions

View File

@@ -17,12 +17,7 @@ import semmle.javascript.security.dataflow.DomBasedXssQuery
import DataFlow::PathGraph
from DataFlow::Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where
(
cfg instanceof HtmlInjectionConfiguration or
cfg instanceof JQueryHtmlOrSelectorInjectionConfiguration
) and
cfg.hasFlowPath(source, sink)
where cfg.hasFlowPath(source, sink)
select sink.getNode(), source, sink,
sink.getNode().(Sink).getVulnerabilityKind() + " vulnerability due to $@.", source.getNode(),
"user-provided value"