Skip to content

Commit 8bc70be

Browse files
committed
Address review comments
1 parent 0fbeef8 commit 8bc70be

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

go/ql/lib/ext/github.com.masterminds.squirrel.model.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,5 @@ extensions:
8080
- ["group:squirrel", "UpdateBuilder", True, "Suffix", "", "", "Argument[0]", "sql-injection", "manual"]
8181
- ["group:squirrel", "UpdateBuilder", True, "Table", "", "", "Argument[0]", "sql-injection", "manual"]
8282
# UpdateBuilder.Where has to be modeled in QL to avoid FPs when a non-string argument is used
83+
84+
# There are summary models for Row.Scan, RowScanner.Scan, {Insert,Delete,Select,Update}Builder.Scan and {Insert,Delete,Select,Update}Builder.ScanContext modeled in QL

go/ql/lib/semmle/go/frameworks/Squirrel.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module Squirrel {
5454
FunctionOutput outp;
5555

5656
BuilderScan() {
57-
// signature: func (b InsertBuilder) Scan(dest ...interface{}) error
57+
// signature: func (b {Insert,Delete,Select,Update}Builder) Scan(dest ...interface{}) error
5858
this.hasQualifiedName(packagePath(),
5959
["DeleteBuilder", "InsertBuilder", "SelectBuilder", "UpdateBuilder"], "Scan") and
6060
inp.isReceiver() and
@@ -71,7 +71,7 @@ module Squirrel {
7171
FunctionOutput outp;
7272

7373
BuilderScanContext() {
74-
// signature: func (b InsertBuilder) ScanContext(ctx context.Context, dest ...interface{}) error
74+
// signature: func (b {Insert,Delete,Select,Update}Builder) ScanContext(ctx context.Context, dest ...interface{}) error
7575
this.hasQualifiedName(packagePath(),
7676
["DeleteBuilder", "InsertBuilder", "SelectBuilder", "UpdateBuilder"], "ScanContext") and
7777
inp.isReceiver() and

0 commit comments

Comments
 (0)