Merge pull request #564 from go-jet/sec-fix
Fix false positive security scan issues.
This commit is contained in:
commit
6c2abe9dd1
3 changed files with 9 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue