add model for the cash library

This commit is contained in:
Erik Krogh Kristensen
2022-05-09 14:03:45 +02:00
parent 66ca01a717
commit e80ee46fe4
4 changed files with 32 additions and 4 deletions

View File

@@ -406,11 +406,11 @@ module JQuery {
private class DefaultRange extends Range {
DefaultRange() {
// either a reference to a global variable `$` or `jQuery`
this = DataFlow::globalVarRef(any(string jq | jq = "$" or jq = "jQuery"))
// either a reference to a global variable `$`, `jQuery`, or `cash`
this = DataFlow::globalVarRef(["$", "jQuery", "cash"])
or
// or imported from a module named `jquery` or `zepto`
this = DataFlow::moduleImport(["jquery", "zepto"])
// or imported from a module named `jquery`, `zepto`, or `cash-dom`
this = DataFlow::moduleImport(["jquery", "zepto", "cash-dom"])
or
this.hasUnderlyingType("JQueryStatic")
}