fix(lint): sanitize UPTOP_KEYS path for gosec G703
CI / test (pull_request) Successful in 2m59s
CI / lint (pull_request) Successful in 1m11s
CI / vulncheck (pull_request) Successful in 1m2s

This commit is contained in:
2026-05-27 16:59:02 -04:00
parent 64b49187f5
commit c8e9893b59
+2 -1
View File
@@ -10,6 +10,7 @@ import (
"net/url" "net/url"
"os" "os"
"os/signal" "os/signal"
"path/filepath"
"strconv" "strconv"
"strings" "strings"
"sync" "sync"
@@ -576,7 +577,7 @@ func seedKeysFromEnv(s store.Store) {
} }
if path := os.Getenv("UPTOP_KEYS"); path != "" { if path := os.Getenv("UPTOP_KEYS"); path != "" {
f, err := os.Open(path) f, err := os.Open(filepath.Clean(path))
if err == nil { if err == nil {
scanner := bufio.NewScanner(f) scanner := bufio.NewScanner(f)
for scanner.Scan() { for scanner.Scan() {