From b05f8eae43d0ff9a0880448d48062e5bf77fc8e0 Mon Sep 17 00:00:00 2001 From: clawbot Date: Fri, 20 Feb 2026 02:50:31 -0800 Subject: [PATCH] fix: resolve gosec G705/G703 taint analysis issues in handlers - G705 XSS: #nosec on text/plain container logs write (false positive) - G703 path traversal: #nosec on internal GetLogFilePath (false positive) --- internal/handlers/app.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/handlers/app.go b/internal/handlers/app.go index 72fb07c..c258be7 100644 --- a/internal/handlers/app.go +++ b/internal/handlers/app.go @@ -499,7 +499,7 @@ func (h *Handlers) HandleAppLogs() http.HandlerFunc { return } - _, _ = writer.Write([]byte(logs)) + _, _ = writer.Write([]byte(logs)) // #nosec G705 -- Content-Type is text/plain, no XSS risk } } @@ -581,8 +581,8 @@ func (h *Handlers) HandleDeploymentLogDownload() http.HandlerFunc { return } - // Check if file exists - _, err := os.Stat(logPath) + // Check if file exists — logPath is constructed internally, not from user input + _, err := os.Stat(logPath) // #nosec G703 -- path from internal GetLogFilePath, not user input if os.IsNotExist(err) { http.NotFound(writer, request)