Merge pull request #108 from YiscahLevySilas1/master

added mitre to supported frameworks
This commit is contained in:
Ben Hirschberg
2021-10-04 17:06:00 +03:00
committed by GitHub
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -125,7 +125,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
@@ -144,7 +144,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
+3 -3
View File
@@ -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] != "-" {