sdk/golang/Databases

Databases

ORM and driver sinks: GORM, sqlx, pgx, database/sql

All 6Source: 1Sink: 5
GoGormDB
gorm.io/gorm.DB

Represents gorm.DB, the primary database handle in GORM v2. Raw(), Exec(), and Where() with string arguments are SQL injection sinks when called with unsanitized user input.

3 sinks5 methods
GoK8sIoClientGo
k8s.io/client-go

Go third-party package — k8s.io/client-go. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

0 methods
GoMongoCollection
go.mongodb.org/mongo-driver/mongo.Collection

MongoDB Go driver Collection and Client. Queries built from user input via bson.D or bson.M with string interpolation are NoSQL injection sinks. The filter argument on Find/Update/Delete operations is where tainted input lands.

7 sinks8 methods
GoPgxConn
github.com/jackc/pgx/v5.Conn

pgx PostgreSQL driver. Connection and Pool types expose Query/Exec/QueryRow that accept raw SQL strings — injection sinks when the SQL is built from user input. pgx is the recommended Postgres driver for new Go projects.

8 sinks8 methods
GoRedisClient
github.com/redis/go-redis/v9.Client

go-redis Client for Redis operations. Most Redis commands are typed and safe, but Eval() and EvalSha() accept Lua scripts that can be injection sinks when the script body is user-controlled. ACL commands can also be sinks.

1 source4 sinks6 methods
GoSqlxDB
github.com/jmoiron/sqlx.DB

Represents sqlx.DB and sqlx.Tx from the sqlx library, which extends database/sql with struct scanning. Unsafe query methods (QueryUnsafe, GetUnsafe) and raw string methods are injection sinks.

4 sinks4 methods