JS: Port ZipSlip

This commit is contained in:
Asger F
2023-10-04 22:12:06 +02:00
parent e9189f965f
commit 7a1aead831
3 changed files with 61 additions and 117 deletions

View File

@@ -14,10 +14,10 @@
import javascript
import semmle.javascript.security.dataflow.ZipSlipQuery
import DataFlow::PathGraph
import DataFlow::DeduplicatePathGraph<ZipSlipFlow::PathNode, ZipSlipFlow::PathGraph>
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
from PathNode source, PathNode sink
where ZipSlipFlow::flowPath(source.getAnOriginalPathNode(), sink.getAnOriginalPathNode())
select source.getNode(), source, sink,
"Unsanitized archive entry, which may contain '..', is used in a $@.", sink.getNode(),
"file system operation"