Skip to content

Commit 4ab5d34

Browse files
egregius313owen-mc
authored andcommitted
Add fake Source function and models
1 parent a8c3ef9 commit 4ab5d34

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ require (
1111
github.com/rqlite/gorqlite v0.0.0-20250128004930-114c7828b55a
1212
go.mongodb.org/mongo-driver v1.17.3
1313
gorm.io/gorm v1.25.12
14+
github.com/nonexistent/sources v0.0.0-20250300000000-000000000000
1415
)
1516

1617
require (

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ extensions:
33
pack: codeql/threat-models
44
extensible: threatModelConfiguration
55
data:
6-
- ["database", true, 0]
6+
- ["database", true, 0]
7+
- addsTo:
8+
pack: codeql/go-all
9+
extensible: sourceModel
10+
data:
11+
- ["github.com/nonexistent/sources", "", False, "Source", "", "", "ReturnValue", "database", "manual"]

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ extensions:
55
extensible: threatModelConfiguration
66
data:
77
- ["database", true, 0]
8+
9+
- addsTo:
10+
pack: codeql/go-all
11+
extensible: sourceModel
12+
data:
13+
- ["github.com/nonexistent/sources", "", False, "Source", "", "", "ReturnValue", "database", "manual"]

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

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ go.mongodb.org/mongo-driver/mongo
2222
# gorm.io/gorm v1.25.12
2323
## explicit
2424
gorm.io/gorm
25+
# github.com/nonexistent/sources v0.0.0-20250300000000-000000000000
26+
## explicit
27+
github.com/nonexistent/sources
2528
# github.com/couchbase/gocbcore/v10 v10.5.4
2629
## explicit
2730
github.com/couchbase/gocbcore/v10

0 commit comments

Comments
 (0)