diff --git a/generator/mysql/mysql_generator.go b/generator/mysql/mysql_generator.go index fe2fa2a..2ecbf9f 100644 --- a/generator/mysql/mysql_generator.go +++ b/generator/mysql/mysql_generator.go @@ -16,9 +16,10 @@ const mysqlMaxConns = 10 // DBConnection contains MySQL connection details type DBConnection struct { - Host string - Port int - User string + Host string + Port int + User string + // #nosec G117 -- password is used only for the local development Password string Params string diff --git a/generator/postgres/postgres_generator.go b/generator/postgres/postgres_generator.go index 196840e..b806f98 100644 --- a/generator/postgres/postgres_generator.go +++ b/generator/postgres/postgres_generator.go @@ -15,9 +15,10 @@ import ( // DBConnection contains postgres connection details type DBConnection struct { - Host string - Port int - User string + Host string + Port int + User string + // #nosec G117 -- password is used only for the local development Password string SslMode string Params string diff --git a/postgres/interval_literal.go b/postgres/interval_literal.go index 3b320ca..7a88912 100644 --- a/postgres/interval_literal.go +++ b/postgres/interval_literal.go @@ -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) }