@@ -1125,7 +1125,7 @@ func (s *Setter) expandToken(token string) (string, error) { //nolint:cyclop
1125
1125
1126
1126
if f , err := s .get ("Port" , reflect .Uint ); err == nil {
1127
1127
if f .Uint () > 0 {
1128
- return strconv .Itoa (int (f .Uint ())), nil
1128
+ return strconv .Itoa (int (f .Uint ())), nil // #nosec G115 -- ignore "integer overflow conversion uint64 -> int"
1129
1129
}
1130
1130
}
1131
1131
if f , err := s .get ("Port" , reflect .String ); err == nil {
@@ -1349,7 +1349,7 @@ func (s *Setter) matchesHost(conditions ...string) (bool, error) {
1349
1349
// matchesMatch checks if the Match directive conditions are met.
1350
1350
func (s * Setter ) matchesMatch (conditions ... string ) (bool , error ) { //nolint:funlen,cyclop // TODO extract functions
1351
1351
log .Trace (context .Background (), "matching Match directive" , "conditions" , conditions )
1352
- for i := range len ( conditions ) {
1352
+ for i := range conditions {
1353
1353
condition := conditions [i ]
1354
1354
log .Trace (context .Background (), "matching Match directive" , "condition" , condition )
1355
1355
var negate bool
@@ -1607,7 +1607,7 @@ func (s *Setter) canonicalizeMaxDots() int {
1607
1607
if md , err := s .get ("CanonicalizeMaxDots" , reflect .Int ); err == nil {
1608
1608
return int (md .Int ())
1609
1609
} else if md , err := s .get ("CanonicalizeMaxDots" , reflect .Uint ); err == nil {
1610
- return int (md .Uint ())
1610
+ return int (md .Uint ()) // #nosec G115 -- ignore "integer overflow conversion int64 -> uint64"
1611
1611
}
1612
1612
return 1
1613
1613
}
0 commit comments