Skip to content

Commit

Permalink
Merge pull request #245 from inteon/fix_linters
Browse files Browse the repository at this point in the history
Fix gosec issues and enable gosec linter
  • Loading branch information
cert-manager-prow[bot] authored May 2, 2024
2 parents 588bc66 + 082b30a commit 99c40ee
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
issues:
exclude-rules:
- linters:
- gosec
text: ".*"
linters:
# Explicitly define all enabled linters
disable-all: true
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const (

KeyStorePKCS12EnableKey = "csi.cert-manager.io/pkcs12-enable"
KeyStorePKCS12FileKey = "csi.cert-manager.io/pkcs12-filename"
KeyStorePKCS12PasswordKey = "csi.cert-manager.io/pkcs12-password"
KeyStorePKCS12PasswordKey = "csi.cert-manager.io/pkcs12-password" // #nosec G101: False positive, gosec thinks this is a credential.
)

const (
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework/helper/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (k *Kubectl) Run(args ...string) error {
baseArgs = []string{"--namespace", k.namespace}
}
args = append(baseArgs, args...)
cmd := exec.Command(k.kubectl, args...)
cmd := exec.Command(k.kubectl, args...) // #nosec G204 -- This function is only used for tests.
cmd.Stdout = log.Writer
cmd.Stderr = log.Writer
return cmd.Run()
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/framework/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ VOodKC004yjh7w9aSbCCbAL0tDEnhm4Jrb8cxt7pDWbdEVUeuk9LZRQtluYBnmJU
kQ7ALfUfUh/RUpCV4uI6sEI3NDX2YqQbOtsBD/hNaL1F85FA
-----END CERTIFICATE-----`

// #nosec G101 -- This is a test PK, ideally we would dynamically
// generate this pair, but this should not be a security risk.
rootKey = `-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAz5DYA7iEBFq/SrCOTsjiYSHlHbTUdLyzselos5cE2++Huon3
InPqMupiDoS8/Qr9srnoKnah7aKB3sY7GlXdg85zcIbQIKocymsRy/GPbEEpfTRG
Expand Down

0 comments on commit 99c40ee

Please sign in to comment.