Skip to content

Commit 1251851

Browse files
authored
Chore: Update repository.go (#599)
## Description Try to correct gosec linter exception as the former one was not working (dunno if an extra space after the double slash would have already helped, so I made it an own line and added a space...)
1 parent 4051b6d commit 1251851

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

api/v1alpha1/constants.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package v1alpha1
22

33
const (
44
// DefaultRegistryCertificateSecretName is the name of the of certificate secret for client and registry.
5-
DefaultRegistryCertificateSecretName = "ocm-registry-tls-certs" //nolint:gosec // not a credential
5+
DefaultRegistryCertificateSecretName = "ocm-registry-tls-certs" // nolint:gosec // not a credential
66
)
77

88
// Internal ExtraIdentity keys.
@@ -35,5 +35,5 @@ const (
3535
// Ocm credential config key for secrets.
3636
const (
3737
// OCMCredentialConfigKey defines the secret key to look for in case a user provides an ocm credential config.
38-
OCMCredentialConfigKey = ".ocmcredentialconfig" //nolint:gosec // it isn't a cred
38+
OCMCredentialConfigKey = ".ocmcredentialconfig" // nolint:gosec // it isn't a cred
3939
)

pkg/oci/repository.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ func (c *Client) setupCertificates(ctx context.Context) error {
143143
}
144144

145145
func (c *Client) constructTLSRoundTripper() http.RoundTripper {
146-
tlsConfig := &tls.Config{} //nolint:gosec // must provide lower version for quay.io
146+
// nolint:gosec // must provide lower version for quay.io
147+
tlsConfig := &tls.Config{}
147148
caCertPool := x509.NewCertPool()
148149
caCertPool.AppendCertsFromPEM(c.ca)
149150

0 commit comments

Comments
 (0)