Fix false positive security scan issues.

This commit is contained in:
go-jet 2026-02-16 13:04:00 +01:00
parent 6ed68f910e
commit 27c67aee3d
3 changed files with 9 additions and 6 deletions

View file

@ -19,6 +19,7 @@ type DBConnection struct {
Host string
Port int
User string
// #nosec G117 -- password is used only for the local development
Password string
Params string

View file

@ -18,6 +18,7 @@ type DBConnection struct {
Host string
Port int
User string
// #nosec G117 -- password is used only for the local development
Password string
SslMode string
Params string

View file

@ -42,6 +42,7 @@ func INTERVAL(quantityAndUnit ...quantityAndUnit) IntervalExpression {
for i := 0; i < len(quantityAndUnit); i += 2 {
quantity := strconv.FormatFloat(quantityAndUnit[i], 'f', -1, 64)
// #nosec G602 -- false positive guarded by even-length check above and i+1 < n in loop
unitString := unitToString(quantityAndUnit[i+1])
fields = append(fields, quantity+" "+unitString)
}