From e1a9f9d27234f196977b645a3fef653fb8859eef Mon Sep 17 00:00:00 2001 From: Oliver Steele Date: Thu, 26 Feb 2026 21:19:34 +0800 Subject: [PATCH] fix: suppress gosec G703 false positive in CLI tool --- cmd/liquid/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/liquid/main.go b/cmd/liquid/main.go index 3af163f..e16dfdb 100644 --- a/cmd/liquid/main.go +++ b/cmd/liquid/main.go @@ -14,6 +14,7 @@ import ( "fmt" "io" "os" + "path/filepath" "strings" "github.com/osteele/liquid" @@ -69,7 +70,7 @@ func main() { case 0: // use stdin case 1: - stdin, err = os.Open(args[0]) + stdin, err = os.Open(filepath.Clean(args[0])) //nolint:gosec // CLI tool intentionally opens user-specified files default: err = errors.New("too many arguments") }