cli/command/image/build: fix nosec comment

Looks like it's broken, so use a blanket "nolint:gosec" instead;

    cli/command/image/build/context.go:238:17: G107: Potential HTTP request made with variable url (gosec)
        if resp, err = http.Get(url); err != nil {
                        ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit df474d5176)
Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
Sebastiaan van Stijn 2024-06-10 21:17:52 +02:00 committed by Cory Snider
parent ac722bb368
commit 5e5ccaa829
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ func GetContextFromURL(out io.Writer, remoteURL, dockerfileName string) (io.Read
// getWithStatusError does an http.Get() and returns an error if the // getWithStatusError does an http.Get() and returns an error if the
// status code is 4xx or 5xx. // status code is 4xx or 5xx.
func getWithStatusError(url string) (resp *http.Response, err error) { func getWithStatusError(url string) (resp *http.Response, err error) {
// #nosec G107 -- Ignore G107: Potential HTTP request made with variable url //nolint:gosec // Ignore G107: Potential HTTP request made with variable url
if resp, err = http.Get(url); err != nil { if resp, err = http.Get(url); err != nil {
return nil, err return nil, err
} }