Create ZipSlip.qll

This commit is contained in:
Ahmed Farid
2022-03-01 00:04:02 +01:00
committed by GitHub
parent 3eae13161f
commit abe25da3df

View File

@@ -0,0 +1,12 @@
import python
import experimental.semmle.python.Concepts
import semmle.python.dataflow.new.DataFlow
import semmle.python.dataflow.new.TaintTracking
class ZipSlipConfig extends TaintTracking::Configuration {
ZipSlipConfig() { this = "ZipSlipConfig" }
override predicate isSource(DataFlow::Node source) { source = any(OpenFile openfile).getAPathArgument() }
override predicate isSink(DataFlow::Node sink) { sink = any(ZipFile zipfile).getAnInput() }
}