diff --git a/pkg/http/http.go b/pkg/http/http.go index 600cfec5..46816547 100644 --- a/pkg/http/http.go +++ b/pkg/http/http.go @@ -223,10 +223,10 @@ func performRequest(req *http.Request, verifyTLS bool) (int, http.Header, []byte requestErr := retry(RequestAttempts, 100*time.Millisecond, func() error { // disable semgrep rule b/c we properly check that resp isn't nil before using it within the err block - resp, err := client.Do(req) // nosemgrep: trailofbits.go.invalid-usage-of-modified-variable.invalid-usage-of-modified-variable + resp, err := client.Do(req) // nosec: trailofbits.go.invalid-usage-of-modified-variable.invalid-usage-of-modified-variable if err != nil { if resp != nil { - defer resp.Body.Close() + defer resp.Body.Close() // #nosec: G307 } utils.LogDebug(err.Error()) @@ -264,7 +264,7 @@ func performRequest(req *http.Request, verifyTLS bool) (int, http.Header, []byte }) if response != nil { - defer response.Body.Close() + defer response.Body.Close() // #nosec: G307 } if requestErr != nil && response == nil {