From 24802c559eb891ea0bd4e4cec3dc54eec932e25a Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Mon, 4 Apr 2022 19:55:41 +0530 Subject: [PATCH] core: fix golangci linter fix golangci linter Signed-off-by: subhamkrai --- cmd/rook/rook/rook.go | 2 +- pkg/daemon/ceph/client/filesystem_mirror_test.go | 2 +- pkg/daemon/ceph/osd/kms/ibm_key_protect.go | 9 ++++----- pkg/daemon/ceph/osd/kms/k8s.go | 7 +++---- pkg/daemon/ceph/osd/kms/vault.go | 6 +++--- pkg/daemon/ceph/osd/volume.go | 2 +- pkg/daemon/ceph/util/util.go | 2 +- pkg/daemon/util/copybins.go | 4 ++-- pkg/operator/ceph/cluster/mgr/dashboard.go | 4 ++-- pkg/operator/ceph/cluster/mon/mon.go | 2 +- pkg/operator/ceph/controller/mirror_peer.go | 10 +++++----- pkg/operator/ceph/csi/peermap/config_test.go | 6 +++--- pkg/operator/ceph/csi/secrets.go | 4 ++-- pkg/operator/ceph/object/admin.go | 2 +- pkg/operator/ceph/object/s3-handlers.go | 2 +- pkg/operator/ceph/object/spec.go | 2 +- pkg/operator/ceph/object/topic/provisioner.go | 2 +- pkg/operator/ceph/test/podspec.go | 4 ++-- pkg/util/exec/exec.go | 8 ++++---- tests/framework/installer/settings.go | 2 +- tests/integration/ceph_base_object_test.go | 2 +- 21 files changed, 41 insertions(+), 43 deletions(-) diff --git a/cmd/rook/rook/rook.go b/cmd/rook/rook/rook.go index 6820547d51a4..37516a4c2442 100644 --- a/cmd/rook/rook/rook.go +++ b/cmd/rook/rook/rook.go @@ -209,7 +209,7 @@ func TerminateFatal(reason error) { if err != nil { fmt.Fprintln(os.Stderr, fmt.Errorf("failed to write message to termination log: %v", err)) } else { - // #nosec G307 Calling defer to close the file without checking the error return is not a risk for a simple file open and close + //nolint:gosec // Calling defer to close the file without checking the error return is not a risk for a simple file open and close defer file.Close() if _, err = file.WriteString(reason.Error()); err != nil { fmt.Fprintln(os.Stderr, fmt.Errorf("failed to write message to termination log: %v", err)) diff --git a/pkg/daemon/ceph/client/filesystem_mirror_test.go b/pkg/daemon/ceph/client/filesystem_mirror_test.go index b7e6efd2785a..ca06e1a88ff8 100644 --- a/pkg/daemon/ceph/client/filesystem_mirror_test.go +++ b/pkg/daemon/ceph/client/filesystem_mirror_test.go @@ -29,7 +29,7 @@ import ( var ( // response of "ceph fs snapshot mirror peer_bootstrap create myfs2 client.mirror test" - // #nosec G101 since this is not leaking any credentials + //nolint:gosec // since this is not leaking any credentials fsMirrorToken = `{"token": "eyJmc2lkIjogIjgyYjdlZDkyLTczYjAtNGIyMi1hOGI3LWVkOTQ4M2UyODc1NiIsICJmaWxlc3lzdGVtIjogIm15ZnMyIiwgInVzZXIiOiAiY2xpZW50Lm1pcnJvciIsICJzaXRlX25hbWUiOiAidGVzdCIsICJrZXkiOiAiQVFEVVAxSmdqM3RYQVJBQWs1cEU4cDI1ZUhld2lQK0ZXRm9uOVE9PSIsICJtb25faG9zdCI6ICJbdjI6MTAuOTYuMTQyLjIxMzozMzAwLHYxOjEwLjk2LjE0Mi4yMTM6Njc4OV0sW3YyOjEwLjk2LjIxNy4yMDc6MzMwMCx2MToxMC45Ni4yMTcuMjA3OjY3ODldLFt2MjoxMC45OS4xMC4xNTc6MzMwMCx2MToxMC45OS4xMC4xNTc6Njc4OV0ifQ=="}` // response of "ceph fs snapshot mirror daemon status myfs" diff --git a/pkg/daemon/ceph/osd/kms/ibm_key_protect.go b/pkg/daemon/ceph/osd/kms/ibm_key_protect.go index c673372f4d33..9134893269e6 100644 --- a/pkg/daemon/ceph/osd/kms/ibm_key_protect.go +++ b/pkg/daemon/ceph/osd/kms/ibm_key_protect.go @@ -23,14 +23,13 @@ import ( const ( TypeIBM = "ibmkeyprotect" - // IbmKeyProtectServiceApiKey is the IBM Key Protect service API key + //nolint:gosec // IbmKeyProtectServiceApiKey is the IBM Key Protect service API key IbmKeyProtectServiceApiKey = "IBM_KP_SERVICE_API_KEY" - // IbmKeyProtectInstanceIdKey is the IBM Key Protect instance id + //nolint:gosec // IbmKeyProtectInstanceIdKey is the IBM Key Protect instance id IbmKeyProtectInstanceIdKey = "IBM_KP_SERVICE_INSTANCE_ID" - // IbmKeyProtectBaseUrlKey is the IBM Key Protect base url + //nolint:gosec // IbmKeyProtectBaseUrlKey is the IBM Key Protect base url IbmKeyProtectBaseUrlKey = "IBM_KP_BASE_URL" - // IbmKeyProtectTokenUrlKey is the IBM Key Protect token url - // #nosec G101 since it's just an URL + //nolint:gosec // IbmKeyProtectTokenUrlKey is the IBM Key Protect token url IbmKeyProtectTokenUrlKey = "IBM_KP_TOKEN_URL" ) diff --git a/pkg/daemon/ceph/osd/kms/k8s.go b/pkg/daemon/ceph/osd/kms/k8s.go index c41ff2c6a9d4..e240711c55b3 100644 --- a/pkg/daemon/ceph/osd/kms/k8s.go +++ b/pkg/daemon/ceph/osd/kms/k8s.go @@ -28,14 +28,13 @@ import ( ) const ( - // OsdEncryptionSecretNameKeyName is the key name of the Secret that contains the OSD encryption key - // #nosec G101 since this is not leaking any hardcoded credentials, it's just the secret key name + //nolint:gosec // OsdEncryptionSecretNameKeyName is the key name of the Secret that contains the OSD encryption key OsdEncryptionSecretNameKeyName = "dmcrypt-key" - // #nosec G101 since this is not leaking any hardcoded credentials, it's just the prefix of the secret name + //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name osdEncryptionSecretNamePrefix = "rook-ceph-osd-encryption-key" - // KMSTokenSecretNameKey is the key name of the Secret that contains the KMS authentication token + //nolint:gosec // KMSTokenSecretNameKey is the key name of the Secret that contains the KMS authentication token, KMSTokenSecretNameKey = "token" ) diff --git a/pkg/daemon/ceph/osd/kms/vault.go b/pkg/daemon/ceph/osd/kms/vault.go index b8720c442605..1a18ce096811 100644 --- a/pkg/daemon/ceph/osd/kms/vault.go +++ b/pkg/daemon/ceph/osd/kms/vault.go @@ -202,7 +202,7 @@ func put(v secrets.Secrets, secretName, secretValue string, keyContext map[strin data := make(map[string]interface{}) data[secretName] = secretValue - // #nosec G104 Write the encryption key in Vault + //nolint:gosec // Write the encryption key in Vault err = v.PutSecret(secretName, data, keyContext) if err != nil { return errors.Wrapf(err, "failed to put secret %q in vault", secretName) @@ -212,7 +212,7 @@ func put(v secrets.Secrets, secretName, secretValue string, keyContext map[strin } func get(v secrets.Secrets, secretName string, keyContext map[string]string) (string, error) { - // #nosec G104 Write the encryption key in Vault + //nolint:gosec // Write the encryption key in Vault s, err := v.GetSecret(secretName, keyContext) if err != nil { return "", err @@ -222,7 +222,7 @@ func get(v secrets.Secrets, secretName string, keyContext map[string]string) (st } func deleteSecret(v secrets.Secrets, secretName string, keyContext map[string]string) error { - // #nosec G104 Write the encryption key in Vault + //nolint:gosec // Write the encryption key in Vault err := v.DeleteSecret(secretName, keyContext) if err != nil { return errors.Wrapf(err, "failed to delete secret %q in vault", secretName) diff --git a/pkg/daemon/ceph/osd/volume.go b/pkg/daemon/ceph/osd/volume.go index ee235edc1b07..52fe3e91ff3e 100644 --- a/pkg/daemon/ceph/osd/volume.go +++ b/pkg/daemon/ceph/osd/volume.go @@ -925,7 +925,7 @@ func readCVLogContent(cvLogFilePath string) string { logger.Errorf("failed to open ceph-volume log file %q. %v", cvLogFilePath, err) return "" } - // #nosec G307 Calling defer to close the file without checking the error return is not a risk for a simple file open and close + //nolint:gosec // Calling defer to close the file without checking the error return is not a risk for a simple file open and close defer cvLogFile.Close() // Read c-v log file diff --git a/pkg/daemon/ceph/util/util.go b/pkg/daemon/ceph/util/util.go index 0234178f268e..eeeeac22775c 100644 --- a/pkg/daemon/ceph/util/util.go +++ b/pkg/daemon/ceph/util/util.go @@ -47,7 +47,7 @@ func GetPortFromEndpoint(endpoint string) int32 { if err != nil { logger.Errorf("failed to split host and port for endpoint %q, assuming default Ceph port %q. %v", endpoint, portString, err) } else { - // #nosec G109 using Atoi to convert type into int is not a real risk + //nolint:gosec // using Atoi to convert type into int is not a real risk port, err = strconv.Atoi(portString) if err != nil { logger.Errorf("failed to convert %q to integer. %v", portString, err) diff --git a/pkg/daemon/util/copybins.go b/pkg/daemon/util/copybins.go index ed5faf05c31d..abcbd6e68446 100644 --- a/pkg/daemon/util/copybins.go +++ b/pkg/daemon/util/copybins.go @@ -32,7 +32,7 @@ func CopyBinaries(target string) error { return copyBinary(defaultRookDir, target, "rook") } -// #nosec G307 Calling defer to close the file without checking the error return is not a risk for a simple file open and close +//nolint:gosec // Calling defer to close the file without checking the error return is not a risk for a simple file open and close func copyBinary(sourceDir, targetDir, filename string) error { sourcePath := path.Join(sourceDir, filename) targetPath := path.Join(targetDir, filename) @@ -67,6 +67,6 @@ func copyBinary(sourceDir, targetDir, filename string) error { if err := destinationFile.Close(); err != nil { return err } - // #nosec targetPath requires the permission to execute + //nolint:gosec // targetPath requires the permission to execute return os.Chmod(targetPath, 0700) } diff --git a/pkg/operator/ceph/cluster/mgr/dashboard.go b/pkg/operator/ceph/cluster/mgr/dashboard.go index 173519ec49a2..328df3f199fc 100644 --- a/pkg/operator/ceph/cluster/mgr/dashboard.go +++ b/pkg/operator/ceph/cluster/mgr/dashboard.go @@ -43,7 +43,7 @@ const ( dashboardPortHTTPS = 8443 dashboardPortHTTP = 7000 dashboardUsername = "admin" - // #nosec because of the word `Password` + //nolint:gosec // because of the word `Password` dashboardPasswordName = "rook-ceph-dashboard-password" passwordLength = 20 passwordKeyName = "password" @@ -291,7 +291,7 @@ func (c *Cluster) getOrGenerateDashboardPassword() (string, error) { } func GeneratePassword(length int) (string, error) { - // #nosec because of the word password + //nolint:gosec // because of the word password const passwordChars = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" passwd, err := GenerateRandomBytes(length) if err != nil { diff --git a/pkg/operator/ceph/cluster/mon/mon.go b/pkg/operator/ceph/cluster/mon/mon.go index 8c03eaa957fa..6c460c690433 100644 --- a/pkg/operator/ceph/cluster/mon/mon.go +++ b/pkg/operator/ceph/cluster/mon/mon.go @@ -62,7 +62,7 @@ const ( // AppName is the name of the secret storing cluster mon.admin key, fsid and name AppName = "rook-ceph-mon" - // OperatorCreds is the name of the secret + //nolint:gosec // OperatorCreds is the name of the secret OperatorCreds = "rook-ceph-operator-creds" monClusterAttr = "mon_cluster" fsidSecretNameKey = "fsid" diff --git a/pkg/operator/ceph/controller/mirror_peer.go b/pkg/operator/ceph/controller/mirror_peer.go index 25f0fc4baa44..6ca260bf39c6 100644 --- a/pkg/operator/ceph/controller/mirror_peer.go +++ b/pkg/operator/ceph/controller/mirror_peer.go @@ -35,15 +35,15 @@ import ( ) const ( - // #nosec G101 since this is not leaking any hardcoded credentials, it's just the prefix of the secret name + //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name poolMirrorBoostrapPeerSecretName = "pool-peer-token" - // #nosec G101 since this is not leaking any hardcoded credentials, it's just the prefix of the secret name + //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name fsMirrorBoostrapPeerSecretName = "fs-peer-token" - // #nosec G101 since this is not leaking any hardcoded credentials, it's just the prefix of the secret name + //nolint:gosec // // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name clusterMirrorBoostrapPeerSecretName = "cluster-peer-token" - // RBDMirrorBootstrapPeerSecretName #nosec G101 since this is not leaking any hardcoded credentials, it's just the prefix of the secret name + //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name RBDMirrorBootstrapPeerSecretName = "rbdMirrorBootstrapPeerSecretName" - // FSMirrorBootstrapPeerSecretName #nosec G101 since this is not leaking any hardcoded credentials, it's just the prefix of the secret name + //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name FSMirrorBootstrapPeerSecretName = "fsMirrorBootstrapPeerSecretName" ) diff --git a/pkg/operator/ceph/csi/peermap/config_test.go b/pkg/operator/ceph/csi/peermap/config_test.go index 1c4f1b128f75..0af9312856c0 100644 --- a/pkg/operator/ceph/csi/peermap/config_test.go +++ b/pkg/operator/ceph/csi/peermap/config_test.go @@ -160,13 +160,13 @@ const ( ns = "rook-ceph-primary" ) -// #nosec G101 fake token for peer cluster "peer1" +//nolint:gosec // fake token for peer cluster "peer1" var fakeTokenPeer1 = "eyJmc2lkIjoiOWY1MjgyZGItYjg5OS00NTk2LTgwOTgtMzIwYzFmYzM5NmYzIiwiY2xpZW50X2lkIjoicmJkLW1pcnJvci1wZWVyIiwia2V5IjoiQVFBUnczOWQwdkhvQmhBQVlMM1I4RmR5dHNJQU50bkFTZ0lOTVE9PSIsIm1vbl9ob3N0IjoiW3YyOjE5Mi4xNjguMS4zOjY4MjAsdjE6MTkyLjE2OC4xLjM6NjgyMV0iLCAibmFtZXNwYWNlIjogInBlZXIxIn0=" -// #nosec G101 fake token for peer cluster "peer2" +//nolint:gosec // fake token for peer cluster "peer2" var fakeTokenPeer2 = "eyJmc2lkIjoiOWY1MjgyZGItYjg5OS00NTk2LTgwOTgtMzIwYzFmYzM5NmYzIiwiY2xpZW50X2lkIjoicmJkLW1pcnJvci1wZWVyIiwia2V5IjoiQVFBUnczOWQwdkhvQmhBQVlMM1I4RmR5dHNJQU50bkFTZ0lOTVE9PSIsIm1vbl9ob3N0IjoiW3YyOjE5Mi4xNjguMS4zOjY4MjAsdjE6MTkyLjE2OC4xLjM6NjgyMV0iLCAibmFtZXNwYWNlIjogInBlZXIyIn0=" -// #nosec G101 fake token for peer cluster "peer3" +//nolint:gosec // fake token for peer cluster "peer3" var fakeTokenPeer3 = "eyJmc2lkIjoiOWY1MjgyZGItYjg5OS00NTk2LTgwOTgtMzIwYzFmYzM5NmYzIiwiY2xpZW50X2lkIjoicmJkLW1pcnJvci1wZWVyIiwia2V5IjoiQVFBUnczOWQwdkhvQmhBQVlMM1I4RmR5dHNJQU50bkFTZ0lOTVE9PSIsIm1vbl9ob3N0IjoiW3YyOjE5Mi4xNjguMS4zOjY4MjAsdjE6MTkyLjE2OC4xLjM6NjgyMV0iLCAibmFtZXNwYWNlIjogInBlZXIzIn0=" var peer1Secret = corev1.Secret{ diff --git a/pkg/operator/ceph/csi/secrets.go b/pkg/operator/ceph/csi/secrets.go index d2d5a45df84c..6c3f7dbe0bf7 100644 --- a/pkg/operator/ceph/csi/secrets.go +++ b/pkg/operator/ceph/csi/secrets.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// #nosec because of the word `Secret` +//nolint:gosec // because of the word `Secret` const ( csiKeyringRBDProvisionerUsername = "client.csi-rbd-provisioner" csiKeyringRBDNodeUsername = "client.csi-rbd-node" @@ -34,7 +34,7 @@ const ( CsiRBDProvisionerSecret = "rook-csi-rbd-provisioner" ) -// #nosec because of the word `Secret` +//nolint:gosec // because of the word `Secret` const ( csiKeyringCephFSProvisionerUsername = "client.csi-cephfs-provisioner" csiKeyringCephFSNodeUsername = "client.csi-cephfs-node" diff --git a/pkg/operator/ceph/object/admin.go b/pkg/operator/ceph/object/admin.go index 5100ad91d8f6..1791f422ef0c 100644 --- a/pkg/operator/ceph/object/admin.go +++ b/pkg/operator/ceph/object/admin.go @@ -95,7 +95,7 @@ func (c *debugHTTPClient) Do(req *http.Request) (*http.Response, error) { const ( // RGWAdminOpsUserSecretName is the secret name of the admin ops user - // #nosec G101 since this is not leaking any hardcoded credentials, it's just the secret name + //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the secret name RGWAdminOpsUserSecretName = "rgw-admin-ops-user" rgwAdminOpsUserAccessKey = "accessKey" rgwAdminOpsUserSecretKey = "secretKey" diff --git a/pkg/operator/ceph/object/s3-handlers.go b/pkg/operator/ceph/object/s3-handlers.go index d758bf8fa1cf..e17ef90081df 100644 --- a/pkg/operator/ceph/object/s3-handlers.go +++ b/pkg/operator/ceph/object/s3-handlers.go @@ -197,7 +197,7 @@ func (s *S3Agent) DeleteObjectInBucket(bucketname string, key string) (bool, err } func BuildTransportTLS(tlsCert []byte, insecure bool) *http.Transport { - // #nosec G402 is enabled only for testing + //nolint:gosec // is enabled only for testing tlsConfig := &tls.Config{MinVersion: tls.VersionTLS12, InsecureSkipVerify: insecure} if len(tlsCert) > 0 { caCertPool := x509.NewCertPool() diff --git a/pkg/operator/ceph/object/spec.go b/pkg/operator/ceph/object/spec.go index 96fed383eefd..938c3ba3f6fb 100644 --- a/pkg/operator/ceph/object/spec.go +++ b/pkg/operator/ceph/object/spec.go @@ -41,7 +41,7 @@ import ( const ( readinessProbePath = "/swift/healthcheck" serviceAccountName = "rook-ceph-rgw" - // #nosec G101 since this is not leaking any hardcoded details + //nolint:gosec // since this is not leaking any hardcoded details setupVaultTokenFile = ` set -e diff --git a/pkg/operator/ceph/object/topic/provisioner.go b/pkg/operator/ceph/object/topic/provisioner.go index 2d3b1934f5a0..4b2189657f66 100644 --- a/pkg/operator/ceph/object/topic/provisioner.go +++ b/pkg/operator/ceph/object/topic/provisioner.go @@ -21,7 +21,7 @@ import ( "context" "crypto/hmac" - // #nosec G505 sha1 is needed for v2 signatures + //nolint:gosec // sha1 is needed for v2 signatures "crypto/sha1" "encoding/base64" "net/http" diff --git a/pkg/operator/ceph/test/podspec.go b/pkg/operator/ceph/test/podspec.go index daf7e2016cd6..4d9ff3b88da9 100644 --- a/pkg/operator/ceph/test/podspec.go +++ b/pkg/operator/ceph/test/podspec.go @@ -67,10 +67,10 @@ func NewPodSpecTester(t *testing.T, spec *v1.PodSpec) *PodSpecTester { func (ps *PodSpecTester) AssertVolumesMeetCephRequirements( daemonType, daemonID string, ) { - // #nosec because of the word `Secret` + //nolint:gosec // because of the word `Secret` keyringSecretName := fmt.Sprintf("rook-ceph-%s-%s-keyring", daemonType, daemonID) if daemonType == config.MonType { - // #nosec because of the word `Secret` + //nolint:gosec // because of the word `Secret` keyringSecretName = "rook-ceph-mons-keyring" } // CephFS mirror has no index so the daemon name is just "rook-ceph-fs-mirror" diff --git a/pkg/util/exec/exec.go b/pkg/util/exec/exec.go index 4d258f7fa922..4498e55a6c9c 100644 --- a/pkg/util/exec/exec.go +++ b/pkg/util/exec/exec.go @@ -74,7 +74,7 @@ func (*CommandExecutor) ExecuteCommandWithEnv(env []string, command string, arg // ExecuteCommandWithTimeout starts a process and wait for its completion with timeout. func (*CommandExecutor) ExecuteCommandWithTimeout(timeout time.Duration, command string, arg ...string) (string, error) { logCommand(command, arg...) - // #nosec G204 Rook controls the input to the exec arguments + //nolint:gosec // Rook controls the input to the exec arguments cmd := exec.Command(command, arg...) var b bytes.Buffer @@ -127,7 +127,7 @@ func (*CommandExecutor) ExecuteCommandWithTimeout(timeout time.Duration, command // ExecuteCommandWithOutput executes a command with output func (*CommandExecutor) ExecuteCommandWithOutput(command string, arg ...string) (string, error) { logCommand(command, arg...) - // #nosec G204 Rook controls the input to the exec arguments + //nolint:gosec // Rook controls the input to the exec arguments cmd := exec.Command(command, arg...) return runCommandWithOutput(cmd, false) } @@ -135,7 +135,7 @@ func (*CommandExecutor) ExecuteCommandWithOutput(command string, arg ...string) // ExecuteCommandWithCombinedOutput executes a command with combined output func (*CommandExecutor) ExecuteCommandWithCombinedOutput(command string, arg ...string) (string, error) { logCommand(command, arg...) - // #nosec G204 Rook controls the input to the exec arguments + //nolint:gosec // Rook controls the input to the exec arguments cmd := exec.Command(command, arg...) return runCommandWithOutput(cmd, true) } @@ -143,7 +143,7 @@ func (*CommandExecutor) ExecuteCommandWithCombinedOutput(command string, arg ... func startCommand(env []string, command string, arg ...string) (*exec.Cmd, io.ReadCloser, io.ReadCloser, error) { logCommand(command, arg...) - // #nosec G204 Rook controls the input to the exec arguments + //nolint:gosec // Rook controls the input to the exec arguments cmd := exec.Command(command, arg...) stdout, err := cmd.StdoutPipe() if err != nil { diff --git a/tests/framework/installer/settings.go b/tests/framework/installer/settings.go index ad01d64041e4..261b1e3a1ed8 100644 --- a/tests/framework/installer/settings.go +++ b/tests/framework/installer/settings.go @@ -59,7 +59,7 @@ func readManifestFromURL(url string) string { var response *http.Response var err error for i := 1; i <= 3; i++ { - // #nosec G107 This is only test code and is expected to read from a url + //nolint:gosec // // This is only test code and is expected to read from a url response, err = http.Get(url) if err != nil { if i == 3 { diff --git a/tests/integration/ceph_base_object_test.go b/tests/integration/ceph_base_object_test.go index 41a6b6b0907f..1c35de0502a4 100644 --- a/tests/integration/ceph_base_object_test.go +++ b/tests/integration/ceph_base_object_test.go @@ -38,7 +38,7 @@ import ( ) const ( - // #nosec G101 since this is not leaking any hardcoded credentials, it's just the secret name + //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the secret name objectTLSSecretName = "rook-ceph-rgw-tls-test-store-csr" )