[Chore] Mark CodeQL warning as safe (#101365)
* Mark CodeQL warning as safe * Temporarily ignore file
This commit is contained in:
@@ -15,6 +15,7 @@ on:
|
|||||||
- '**/*.md'
|
- '**/*.md'
|
||||||
- '**/*.txt'
|
- '**/*.txt'
|
||||||
- '**/*.yml'
|
- '**/*.yml'
|
||||||
|
- pkg/storage/unified/sql/db/dbimpl/db.go # Ignoring warnings on the whole file for now while inline comments is not supported in Go (https://github.com/github/codeql/issues/11427)
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 4 * * 6'
|
- cron: '0 4 * * 6'
|
||||||
|
|
||||||
|
|||||||
@@ -48,10 +48,14 @@ type sqlTx struct {
|
|||||||
*sql.Tx
|
*sql.Tx
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d sqlTx) QueryContext(ctx context.Context, query string, args ...any) (db.Rows, error) {
|
func (tx sqlTx) QueryContext(ctx context.Context, query string, args ...any) (db.Rows, error) {
|
||||||
return d.Tx.QueryContext(ctx, query, args...)
|
// // codeql-suppress go/sql-query-built-from-user-controlled-sources "The query comes from a safe template source
|
||||||
|
// and the parameters are passed as arguments."
|
||||||
|
return tx.Tx.QueryContext(ctx, query, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d sqlTx) QueryRowContext(ctx context.Context, query string, args ...any) db.Row {
|
func (tx sqlTx) QueryRowContext(ctx context.Context, query string, args ...any) db.Row {
|
||||||
return d.Tx.QueryRowContext(ctx, query, args...)
|
// // codeql-suppress go/sql-query-built-from-user-controlled-sources "The query comes from a safe template source
|
||||||
|
// and the parameters are passed as arguments."
|
||||||
|
return tx.Tx.QueryRowContext(ctx, query, args...)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user