JS: Port InsecureRandomness

This commit is contained in:
Asger F
2023-10-05 09:20:58 +02:00
parent 99f63b1cfa
commit cd1a1e25ae
3 changed files with 91 additions and 144 deletions

View File

@@ -14,10 +14,10 @@
import javascript
import semmle.javascript.security.dataflow.InsecureRandomnessQuery
import DataFlow::PathGraph
import InsecureRandomnessFlow::PathGraph
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
from InsecureRandomnessFlow::PathNode source, InsecureRandomnessFlow::PathNode sink
where InsecureRandomnessFlow::flowPath(source, sink)
select sink.getNode(), source, sink,
"This uses a cryptographically insecure random number generated at $@ in a security context.",
source.getNode(), source.getNode().toString()