JS: Port TypeConfusionThroughParameterTampering

This commit is contained in:
Asger F
2023-10-05 09:24:00 +02:00
parent 25962a9ba6
commit 5af608c937
4 changed files with 120 additions and 92 deletions

View File

@@ -12,10 +12,10 @@
import javascript
import semmle.javascript.security.dataflow.TypeConfusionThroughParameterTamperingQuery
import DataFlow::PathGraph
import TypeConfusionFlow::PathGraph
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
from TypeConfusionFlow::PathNode source, TypeConfusionFlow::PathNode sink
where TypeConfusionFlow::flowPath(source, sink)
select sink.getNode(), source, sink,
"Potential type confusion as $@ may be either an array or a string.", source.getNode(),
"this HTTP request parameter"