chore(gosec): enable gosec and address findings

This commit is contained in:
Hein
2026-09-30 13:16:12 +02:00
parent 9533c3a0ed
commit f66930c3c9
37 changed files with 133 additions and 122 deletions
+3 -2
View File
@@ -9,8 +9,9 @@ import (
"fmt"
"time"
"github.com/bitechdev/ResolveSpec/pkg/logger"
"github.com/bradfitz/gomemcache/memcache"
"github.com/bitechdev/ResolveSpec/pkg/logger"
)
const (
@@ -137,7 +138,7 @@ func memcacheExpiry(ttl time.Duration) int32 {
}
secs := int64(ttl.Seconds())
if secs > memcacheMaxRelativeTTL {
return int32(time.Now().Add(ttl).Unix())
return int32(time.Now().Add(ttl).Unix()) //nolint:gosec // G115: value range bounded by caller/type, conversion intentional
}
if secs == 0 {
secs = 1
+2 -1
View File
@@ -7,8 +7,9 @@ import (
"strings"
"time"
"github.com/bitechdev/ResolveSpec/pkg/logger"
"github.com/redis/go-redis/v9"
"github.com/bitechdev/ResolveSpec/pkg/logger"
)
// RedisProvider is a Redis implementation of the Provider interface.