JS: update a js/code-injection test

This commit is contained in:
Esben Sparre Andreasen
2019-09-11 09:45:54 +02:00
parent e41080fb40
commit f3de75ae07
3 changed files with 111 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
import javascript
import semmle.javascript.heuristics.AdditionalSources
import semmle.javascript.security.dataflow.CodeInjection::CodeInjection
import DataFlow::PathGraph
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink) and source.getNode() instanceof HeuristicSource
select sink.getNode(), source, sink, "$@ flows to here and is interpreted as code.",
source.getNode(), "User-provided value"