From f0cd1965b40cccdb35306e2c8917d702664c2e34 Mon Sep 17 00:00:00 2001 From: Avner Tzur Date: Mon, 4 Oct 2021 13:51:47 +0300 Subject: [PATCH 1/2] update git repo URL using https --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e4bd782..701c1bf5 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ Note: development (and the release process) is done with Go `1.16` 1. Clone Project ``` -git clone git@github.com:armosec/kubescape.git kubescape && cd "$_" +git clone https://github.com/armosec/kubescape.git kubescape && cd "$_" ``` 2. Build @@ -142,7 +142,7 @@ go mod tidy && go build -o kubescape . 1. Clone Project ``` -git clone git@github.com:armosec/kubescape.git kubescape && cd "$_" +git clone https://github.com/armosec/kubescape.git kubescape && cd "$_" ``` 2. Build From 25247491eeed6c8d9b3c7343b3c74137022f4e4b Mon Sep 17 00:00:00 2001 From: yiscah Date: Mon, 4 Oct 2021 16:56:18 +0300 Subject: [PATCH 2/2] add mitre to supportedFrameworks, accept upper/lowercase "MITRE" --- cmd/framework.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/framework.go b/cmd/framework.go index 1487e0fa..e247e183 100644 --- a/cmd/framework.go +++ b/cmd/framework.go @@ -23,7 +23,7 @@ import ( ) var scanInfo cautils.ScanInfo -var supportedFrameworks = []string{"nsa"} +var supportedFrameworks = []string{"nsa", "mitre"} type CLIHandler struct { policyHandler *policyhandler.PolicyHandler @@ -39,7 +39,7 @@ var frameworkCmd = &cobra.Command{ if len(args) < 1 && !(cmd.Flags().Lookup("use-from").Changed) { return fmt.Errorf("requires at least one argument") } else if len(args) > 0 { - if !isValidFramework(args[0]) { + if !isValidFramework(strings.ToLower(args[0])) { return fmt.Errorf(fmt.Sprintf("supported frameworks: %s", strings.Join(supportedFrameworks, ", "))) } } @@ -50,7 +50,7 @@ var frameworkCmd = &cobra.Command{ scanInfo.PolicyIdentifier.Kind = opapolicy.KindFramework if !(cmd.Flags().Lookup("use-from").Changed) { - scanInfo.PolicyIdentifier.Name = args[0] + scanInfo.PolicyIdentifier.Name = strings.ToLower(args[0]) } if len(args) > 0 { if len(args[1:]) == 0 || args[1] != "-" {