mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
some fixes around command textx
This commit is contained in:
+3
-2
@@ -12,6 +12,7 @@ import (
|
||||
"kubescape/policyhandler"
|
||||
"kubescape/printer"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@@ -26,7 +27,7 @@ type CLIHandler struct {
|
||||
|
||||
var frameworkCmd = &cobra.Command{
|
||||
Use: "framework <framework name>",
|
||||
Short: "The framework you wish to use. Supported frameworks: nsa, mitre",
|
||||
Short: fmt.Sprintf("The framework you wish to use. Supported frameworks: %s", strings.Join(supportedFrameworks, ", ")),
|
||||
Long: ``,
|
||||
ValidArgs: supportedFrameworks,
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
@@ -34,7 +35,7 @@ var frameworkCmd = &cobra.Command{
|
||||
return errors.New("requires at least one argument")
|
||||
}
|
||||
if !isValidFramework(args[0]) {
|
||||
return errors.New("supported frameworks: nsa and mitre")
|
||||
return errors.New(fmt.Sprintf("supported frameworks: %s", strings.Join(supportedFrameworks, ", ")))
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ var cfgFile string
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "kubescape",
|
||||
Short: "A tool for running NSA recommended tests in your cluster ",
|
||||
Long: `Kubescape is the first tool for testing if Kubernetes is deployed securely as defined in Kubernetes Hardening Guidance
|
||||
by to NSA and CISA Tests are configured with YAML files, making this tool easy to update as test specifications evolve.`,
|
||||
Short: "Kubescape is a tool for testing Kubernetes security posture",
|
||||
Long: `Kubescape is a tool for testing Kubernetes security posture based on NSA and MITRE specifications.`,
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
||||
// scanCmd represents the scan command
|
||||
var scanCmd = &cobra.Command{
|
||||
Use: "scan",
|
||||
Short: "Scan the current running cluster or specified yaml files",
|
||||
Short: "Scan the current running cluster or yaml files",
|
||||
Long: `The action you want to perform`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user