From c33e3ddd882b08ad4441c5cecb0666ce961f1408 Mon Sep 17 00:00:00 2001 From: "Mark S. Lewis" Date: Sun, 22 Feb 2026 20:57:32 +0000 Subject: [PATCH] Fix golangci-lint failures Signed-off-by: Mark S. Lewis --- .golangci.yml | 5 +++++ internal/osnadmin/httpclient.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 559f652..f5c647c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -33,6 +33,11 @@ linters: presets: - common-false-positives - std-error-handling + rules: + - path: "_test.go$" + text: "^G703:" + linters: + - gosec formatters: enable: - gofmt diff --git a/internal/osnadmin/httpclient.go b/internal/osnadmin/httpclient.go index 09c186c..7ca26f3 100644 --- a/internal/osnadmin/httpclient.go +++ b/internal/osnadmin/httpclient.go @@ -26,7 +26,7 @@ func httpClient(caCertPool *x509.CertPool, tlsClientCert tls.Certificate) *http. func httpDo(req *http.Request, caCertPool *x509.CertPool, tlsClientCert tls.Certificate) (*http.Response, error) { client := httpClient(caCertPool, tlsClientCert) - return client.Do(req) + return client.Do(req) //#nosec G704 -- responsibility of client to supply valid URL root. } func httpGet(url string, caCertPool *x509.CertPool, tlsClientCert tls.Certificate) (*http.Response, error) {