fix(lint): sanitize UPTOP_KEYS path for gosec G703
This commit is contained in:
+2
-1
@@ -10,6 +10,7 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -576,7 +577,7 @@ func seedKeysFromEnv(s store.Store) {
|
||||
}
|
||||
|
||||
if path := os.Getenv("UPTOP_KEYS"); path != "" {
|
||||
f, err := os.Open(path)
|
||||
f, err := os.Open(filepath.Clean(path))
|
||||
if err == nil {
|
||||
scanner := bufio.NewScanner(f)
|
||||
for scanner.Scan() {
|
||||
|
||||
Reference in New Issue
Block a user