Skip to content

Commit 89e853b

Browse files
committed
Don't use non-existent dependency
This makes some go tooling, like `go mod tidy`, not work.
1 parent 88b061e commit 89e853b

File tree

6 files changed

+10
-16
lines changed

6 files changed

+10
-16
lines changed

go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ require (
1212
github.com/rqlite/gorqlite v0.0.0-20250128004930-114c7828b55a
1313
go.mongodb.org/mongo-driver v1.17.3
1414
gorm.io/gorm v1.25.12
15-
github.com/nonexistent/sources v0.0.0-20250300000000-000000000000
1615
)
1716

1817
require (

go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/source.ext.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ extensions:
88
pack: codeql/go-all
99
extensible: sourceModel
1010
data:
11-
- ["github.com/nonexistent/sources", "", False, "Source", "", "", "ReturnValue", "database", "manual"]
11+
- ["test", "", False, "Source", "", "", "ReturnValue", "database", "manual"]

go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test.ext.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ extensions:
1010
pack: codeql/go-all
1111
extensible: sourceModel
1212
data:
13-
- ["github.com/nonexistent/sources", "", False, "Source", "", "", "ReturnValue", "database", "manual"]
13+
- ["test", "", False, "Source", "", "", "ReturnValue", "database", "manual"]

go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_Masterminds_squirrel.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ import (
66
"context"
77

88
"github.com/Masterminds/squirrel"
9-
src "github.com/nonexistent/sources"
109
)
1110

11+
func Source[T any]() T {
12+
return *new(T)
13+
}
14+
1215
func test_Masterminds_squirrel_QueryRower(ctx context.Context, db squirrel.QueryRower, sqlizer squirrel.Sqlizer) {
1316
scanner := db.QueryRow("") // $ source
1417

@@ -136,7 +139,7 @@ func test_Masterminds_squirrel_DeleteBuilder(ctx context.Context, builder squirr
136139
sink(r32) // $ hasTaintFlow="r32"
137140
sink(r33) // $ hasTaintFlow="r33"
138141

139-
builder2 := src.Source[squirrel.DeleteBuilder]() // $ source
142+
builder2 := Source[squirrel.DeleteBuilder]() // $ source
140143

141144
var r41, r42, r43 string
142145
builder2.ScanContext(ctx, &r41, &r42, &r43)
@@ -177,7 +180,7 @@ func test_Masterminds_squirrel_InsertBuilder(ctx context.Context, builder squirr
177180
sink(r42) // $ hasTaintFlow="r42"
178181
sink(r43) // $ hasTaintFlow="r43"
179182

180-
builder2 := src.Source[squirrel.InsertBuilder]() // $ source
183+
builder2 := Source[squirrel.InsertBuilder]() // $ source
181184

182185
var r51, r52, r53 string
183186
builder2.Scan(&r51, &r52, &r53)
@@ -225,7 +228,7 @@ func test_Masterminds_squirrel_SelectBuilder(ctx context.Context, builder squirr
225228
sink(r42) // $ hasTaintFlow="r42"
226229
sink(r43) // $ hasTaintFlow="r43"
227230

228-
builder2 := src.Source[squirrel.SelectBuilder]() // $ source
231+
builder2 := Source[squirrel.SelectBuilder]() // $ source
229232

230233
var r51, r52, r53 string
231234
builder2.Scan(&r51, &r52, &r53)
@@ -273,7 +276,7 @@ func test_Masterminds_squirrel_UpdateBuilder(ctx context.Context, builder squirr
273276
sink(r42) // $ hasTaintFlow="r42"
274277
sink(r43) // $ hasTaintFlow="r43"
275278

276-
builder2 := src.Source[squirrel.UpdateBuilder]() // $ source
279+
builder2 := Source[squirrel.UpdateBuilder]() // $ source
277280

278281
var r51, r52, r53 string
279282
builder2.Scan(&r51, &r52, &r53)

go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/vendor/github.com/nonexistent/sources/stub.go

Lines changed: 0 additions & 5 deletions
This file was deleted.

go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/vendor/modules.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ go.mongodb.org/mongo-driver/mongo
2525
# gorm.io/gorm v1.25.12
2626
## explicit
2727
gorm.io/gorm
28-
# github.com/nonexistent/sources v0.0.0-20250300000000-000000000000
29-
## explicit
30-
github.com/nonexistent/sources
3128
# github.com/couchbase/gocbcore/v10 v10.5.4
3229
## explicit
3330
github.com/couchbase/gocbcore/v10

0 commit comments

Comments
 (0)