From acec6cb56fbfe2bc3cd1c7f0e8dcd5a5c7ed558b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 01:51:07 +0100 Subject: [PATCH] cli/command/image/build: G107: Potential HTTP request made with variable url (gosec) cli/command/image/build/context.go:235: G107: Potential HTTP request made with variable url (gosec) if resp, err = http.Get(url); err != nil { Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 0e4bd30cfe59451f26489d863f926cacd24067d8) Signed-off-by: Sebastiaan van Stijn --- cli/command/image/build/context.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/command/image/build/context.go b/cli/command/image/build/context.go index e9af9bd358..89ef1db070 100644 --- a/cli/command/image/build/context.go +++ b/cli/command/image/build/context.go @@ -232,6 +232,7 @@ 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) { + // #nosec G107 if resp, err = http.Get(url); err != nil { return nil, err }