From 2829749d842066fa24ec4dfedea2831db5b1464b Mon Sep 17 00:00:00 2001 From: Nic Manoogian Date: Mon, 19 Aug 2024 18:15:31 -0400 Subject: [PATCH] Add gosec ignore for body close --- pkg/api/api.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/api/api.go b/pkg/api/api.go index 45d8346..b67b09b 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -100,6 +100,8 @@ func PerformRequest(context APIContext, req *http.Request) (*APIResponse, *APIEr if err != nil { return nil, &APIError{Err: err, Message: "Unable to load response"} } + + // #nosec G307 defer r.Body.Close() body, err := ioutil.ReadAll(r.Body)