Merge pull request #564 from go-jet/sec-fix

Fix false positive security scan issues.
This commit is contained in:
go-jet 2026-02-16 13:09:59 +01:00 committed by GitHub
commit 6c2abe9dd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 6 deletions

View file

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

View file

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

View file

@ -42,6 +42,7 @@ func INTERVAL(quantityAndUnit ...quantityAndUnit) IntervalExpression {
for i := 0; i < len(quantityAndUnit); i += 2 { for i := 0; i < len(quantityAndUnit); i += 2 {
quantity := strconv.FormatFloat(quantityAndUnit[i], 'f', -1, 64) 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]) unitString := unitToString(quantityAndUnit[i+1])
fields = append(fields, quantity+" "+unitString) fields = append(fields, quantity+" "+unitString)
} }