Skip to content

Commit 8ac4f64

Browse files
committed
Add fake Source function and models
1 parent da8b415 commit 8ac4f64

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
@@ -6,4 +6,5 @@ require (
66
gorm.io/gorm v1.23.0
77
github.com/jmoiron/sqlx v1.4.0
88
go.mongodb.org/mongo-driver/mongo v1.17.2
9+
github.com/nonexistent/sources v0.0.0-20250300000000-000000000000
910
)

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
@@ -7,3 +7,6 @@ github.com/jmoiron/sqlx
77
# go.mongodb.org/mongo-driver/mongo v1.17.2
88
## explicit
99
go.mongodb.org/mongo-driver/mongo
10+
# github.com/nonexistent/sources v0.0.0-20250300000000-000000000000
11+
## explicit
12+
github.com/nonexistent/sources

0 commit comments

Comments
 (0)