JS: Port RegExpInjection

This commit is contained in:
Asger F
2023-10-05 09:21:46 +02:00
parent 2400af4bc3
commit dcc73a7f90
3 changed files with 87 additions and 116 deletions

View File

@@ -15,9 +15,9 @@
import javascript
import semmle.javascript.security.dataflow.RegExpInjectionQuery
import DataFlow::PathGraph
import RegExpInjectionFlow::PathGraph
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
from RegExpInjectionFlow::PathNode source, RegExpInjectionFlow::PathNode sink
where RegExpInjectionFlow::flowPath(source, sink)
select sink.getNode(), source, sink, "This regular expression is constructed from a $@.",
source.getNode(), source.getNode().(Source).describe()