From f0edc7953029d5a1fd3c8641e599198a523bae66 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 3 Jan 2024 13:46:19 +0100 Subject: [PATCH] change back nolint -> nosec commit 9e1f8d646e15b2626e56960e9505ad281937dc30 changed this to a "nolint" comment due to a regression in GoSec. That regression was fixed, so we can go back to use the more fine-grained "nosec" comment. Signed-off-by: Sebastiaan van Stijn --- cli/command/image/build/context.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/command/image/build/context.go b/cli/command/image/build/context.go index d570fe657c..6a5a50a1b4 100644 --- a/cli/command/image/build/context.go +++ b/cli/command/image/build/context.go @@ -234,7 +234,8 @@ func GetContextFromURL(out io.Writer, remoteURL, dockerfileName string) (io.Read // getWithStatusError does an http.Get() and returns an error if the // status code is 4xx or 5xx. func getWithStatusError(url string) (resp *http.Response, err error) { - if resp, err = http.Get(url); err != nil { //nolint:gosec // Ignore G107: Potential HTTP request made with variable url + //#nosec G107 -- Ignore G107: Potential HTTP request made with variable url + if resp, err = http.Get(url); err != nil { return nil, err } if resp.StatusCode < http.StatusBadRequest {