diff --git a/Makefile b/Makefile index a4d88b6dea28237ef87a8cafaf85b22138a58615..543aca7f709702265b3f5ef3e682021bf5e6d1d1 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,8 @@ JSONNET_BIN=$(BIN_DIR)/jsonnet JSONNETLINT_BIN=$(BIN_DIR)/jsonnet-lint JSONNETFMT_BIN=$(BIN_DIR)/jsonnetfmt KUBECONFORM_BIN=$(BIN_DIR)/kubeconform -TOOLING=$(JB_BIN) $(GOJSONTOYAML_BIN) $(JSONNET_BIN) $(JSONNETLINT_BIN) $(JSONNETFMT_BIN) $(KUBECONFORM_BIN) $(MDOX_BIN) +KUBESCAPE_BIN=$(BIN_DIR)/kubescape +TOOLING=$(JB_BIN) $(GOJSONTOYAML_BIN) $(JSONNET_BIN) $(JSONNETLINT_BIN) $(JSONNETFMT_BIN) $(KUBECONFORM_BIN) $(MDOX_BIN) $(KUBESCAPE_BIN) JSONNETFMT_ARGS=-n 2 --max-blank-lines 2 --string-style s --comment-style s @@ -63,6 +64,10 @@ validate-1.23: kubeconform: crdschemas manifests $(KUBECONFORM_BIN) $(KUBECONFORM_BIN) -kubernetes-version $(KUBE_VERSION) -schema-location 'default' -schema-location 'crdschemas/{{ .ResourceKind }}.json' -skip CustomResourceDefinition manifests/ +.PHONY: kubescape +kubescape: $(KUBESCAPE_BIN) ## Runs a security analysis on generated manifests - failing if risk score is above 40% + $(KUBESCAPE_BIN) scan -s framework -t 40 nsa manifests/*.yaml + .PHONY: fmt fmt: $(JSONNETFMT_BIN) find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \