change back nolint -> nosec

commit 9e1f8d646e 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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2024-01-03 13:46:19 +01:00
parent 3c0c68a45a
commit f0edc79530
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 1 deletions

View File

@ -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 // 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) {
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 return nil, err
} }
if resp.StatusCode < http.StatusBadRequest { if resp.StatusCode < http.StatusBadRequest {