Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 95c1f75

Browse files
committed
Add alternative package locations
1 parent baf048f commit 95c1f75

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ql/src/semmle/go/frameworks/SQL.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,13 @@ module SQL {
161161
}
162162
}
163163

164-
/** A model for sinks of github.com/jinzhu/gorm. */
164+
/** A model for sinks of GORM. */
165165
private class GormSink extends SQL::QueryString::Range {
166166
GormSink() {
167-
exists(Method meth, string name |
168-
meth.hasQualifiedName("github.com/jinzhu/gorm", "DB", name) and
167+
exists(Method meth, string package, string name |
168+
meth.hasQualifiedName(package, "DB", name) and
169169
this = meth.getACall().getArgument(0) and
170+
package in ["github.com/jinzhu/gorm", "github.com/go-gorm/gorm", "gorm.io/gorm"] and
170171
name in ["Where", "Raw", "Order", "Not", "Or", "Select", "Table", "Group", "Having", "Joins"]
171172
)
172173
}

0 commit comments

Comments
 (0)