Skip to content

Commit

Permalink
Add gosec (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
hebelsan authored Nov 28, 2024
1 parent 2dedcd4 commit 6f6260d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ check-generate:
format: $(GOIMPORTS) $(GOIMPORTSREVISER)
@bash $(GARDENER_HACK_DIR)/format.sh ./cmd ./pkg ./test

.PHONY: sast
sast: $(GOSEC)
@bash $(GARDENER_HACK_DIR)/sast.sh

.PHONY: sast-report
sast-report: $(GOSEC)
@bash $(GARDENER_HACK_DIR)/sast.sh --gosec-report true

.PHONY: check
check: $(GO_ADD_LICENSE) $(GOIMPORTS) $(GOLANGCI_LINT)
@bash $(GARDENER_HACK_DIR)/check.sh --golangci-lint-config=./.golangci.yaml ./cmd/... ./pkg/... ./test/...
Expand All @@ -99,10 +107,10 @@ test-clean:
@bash $(GARDENER_HACK_DIR)/test-cover-clean.sh

.PHONY: verify
verify: check format test
verify: check format test sast

.PHONY: verify-extended
verify-extended: check-generate check format test-cov test-clean
verify-extended: check-generate check format test-cov test-clean sast-report

.PHONY: clean
clean:
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewFactoryFromSecret(secret *corev1.Secret) (*Factory, error) {
}

func newAuthenticatedProviderClientFromCredentials(credentials *credentials) (*gophercloud.ProviderClient, error) {
config := &tls.Config{}
config := &tls.Config{} // #nosec: G402 -- Can be parameterized.

if credentials.CACert != nil {
caCertPool := x509.NewCertPool()
Expand Down

0 comments on commit 6f6260d

Please sign in to comment.