diff --git a/client/addon_deployment_update.go b/client/addon_deployment_update.go index 4e076eef..be5a4ee1 100644 --- a/client/addon_deployment_update.go +++ b/client/addon_deployment_update.go @@ -52,8 +52,8 @@ func (h *V1Client) PatchWithRetry(params *clientV1.V1SpectroClustersPatchProfile var err error rand.NewSource(time.Now().UnixNano()) for attempt := 0; attempt < h.retryAttempts; attempt++ { - // small jitter to prevent simultaneous retries - s := rand.Intn(h.retryAttempts) // n will be between 0 and number of retries + // small jitter to prevent simultaneous retries. n will be between 0 and number of retries. + s := rand.Intn(h.retryAttempts) // #nosec G404 - random number is not used for security purposes log.Printf("Sleeping %d seconds, retry: %d, cluster:%s, profile:%s, ", s, attempt, params.UID, params.Body.Profiles[0].UID) time.Sleep(time.Duration(s) * time.Second) err = h.ClustersPatchProfiles(params) diff --git a/client/client.go b/client/client.go index d907ae9b..15fa84e9 100644 --- a/client/client.go +++ b/client/client.go @@ -206,7 +206,7 @@ func (h *V1Client) httpClient() *http.Client { Transport: &http.Transport{ Proxy: http.ProxyFromEnvironment, TLSClientConfig: &tls.Config{ - InsecureSkipVerify: h.insecureSkipVerify, + InsecureSkipVerify: h.insecureSkipVerify, // #nosec G402 - InsecureSkipVerify is enabled via user input }, }, }