We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems, at least the latest version of, gosec only works with the standard sql package ?
By changing the code from the documentation to
import ( "database/sql" "github.com/jmoiron/sqlx" ) var staticQuery = "SELECT * FROM foo WHERE age < " func main() { db, err := sql.Open("sqlite3", ":memory:") if err != nil { panic(err) } xdb := sqlx.NewDb(db, "sqlite3") var gender string = "M" rows, err := xdb.Query("SELECT * FROM foo WHERE gender = " + gender) if err != nil { panic(err) } defer rows.Close() }
the summary returns
Summary: Gosec : 2.21.4 Nosec : 0 Issues : 0
While when running the Query against the db, it returns
Query
db
Summary: Gosec : 2.21.4 Nosec : 0 Issues : 1
2.21.4
go version go1.23.1 darwin/arm64
MacOS 14.6.1
Gosec to find sql query issues when using libraries like sqlx or pgx for interacting with various dbs.
sqlx
pgx
Gosec reporting no issues when using libraries outside of the std lib sql pkg.
The text was updated successfully, but these errors were encountered:
Thanks for this issue but we aren't planning to support third party libraries.
Sorry, something went wrong.
@ccojocar is there openness to PRs being made to add support for third party libraries or is it a hard no ?
Thanks!
Adding third party library requires maintenance which we would like to avoid for now. Thanks
No branches or pull requests
Summary
It seems, at least the latest version of, gosec only works with the standard sql package ?
Steps to reproduce the behavior
By changing the code from the documentation to
the summary returns
While when running the
Query
against thedb
, it returnsgosec version
2.21.4
Go version (output of 'go version')
go version go1.23.1 darwin/arm64
Operating system / Environment
MacOS 14.6.1
Expected behavior
Gosec to find sql query issues when using libraries like
sqlx
orpgx
for interacting with various dbs.Actual behavior
Gosec reporting no issues when using libraries outside of the std lib sql pkg.
The text was updated successfully, but these errors were encountered: