From 7779c40758947f3bd034b450cfc667479e28aa93 Mon Sep 17 00:00:00 2001 From: jberkhahn Date: Thu, 26 Jan 2023 14:54:36 -0800 Subject: [PATCH] change kustomize install templating to avoid tripping automated security alerts Signed-off-by: jberkhahn --- Makefile | 3 ++- pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 Makefile diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index 62c570f61aa..b36d43582eb --- a/Makefile +++ b/Makefile @@ -131,7 +131,8 @@ test-testdata: ## Run the tests of the testdata directory test-legacy: ## Run the legacy tests (go/v2) of the testdata directory ./test/testdata/test_legacy.sh -.PHONY: test-e2e-local +.PHONY: test-:1 + e2e-local test-e2e-local: ## Run the end-to-end tests locally ## To keep the same kind cluster between test runs, use `SKIP_KIND_CLEANUP=1 make test-e2e-local` ./test/e2e/local.sh diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go index ceded0c26d6..ea685f299c0 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go @@ -203,7 +203,7 @@ $(KUSTOMIZE): $(LOCALBIN) echo "$(LOCALBIN)/kustomize version is not expected $(KUSTOMIZE_VERSION). Removing it before installing."; \ rm -rf $(LOCALBIN)/kustomize; \ fi - test -s $(LOCALBIN)/kustomize || { curl -Ss $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); } + test -s $(LOCALBIN)/kustomize || { curl -Ss $(KUSTOMIZE_INSTALL_SCRIPT) --output install_kustomize.sh && bash install_kustomize.sh $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); rm install_kustomize.sh; } .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. If wrong version is installed, it will be overwritten.