Skip to content

Commit 615eb2b

Browse files
authored
chore: change exception for gosec linter (#600)
## Description change exception for gosec linter
1 parent 1251851 commit 615eb2b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/check-manifest-generation-diff.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Check for diff after manifest and generated targets
33
on:
44
pull_request: {}
55

6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
610
jobs:
711
diff-check-manifests:
812
name: Check for diff

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" // #nosec G101 // 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" // #nosec G101 // not a credential
3939
)

pkg/oci/repository.go

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

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

0 commit comments

Comments
 (0)