Add alternative package locations

This commit is contained in:
Owen Mansel-Chan
2020-09-09 14:04:02 +01:00
parent baf048f293
commit 95c1f754c6

View File

@@ -161,12 +161,13 @@ module SQL {
}
}
/** A model for sinks of github.com/jinzhu/gorm. */
/** A model for sinks of GORM. */
private class GormSink extends SQL::QueryString::Range {
GormSink() {
exists(Method meth, string name |
meth.hasQualifiedName("github.com/jinzhu/gorm", "DB", name) and
exists(Method meth, string package, string name |
meth.hasQualifiedName(package, "DB", name) and
this = meth.getACall().getArgument(0) and
package in ["github.com/jinzhu/gorm", "github.com/go-gorm/gorm", "gorm.io/gorm"] and
name in ["Where", "Raw", "Order", "Not", "Or", "Select", "Table", "Group", "Having", "Joins"]
)
}