From eddbed4363098cb2d958a2ef7a63484f5c320cc4 Mon Sep 17 00:00:00 2001 From: Daniel Grunberger Date: Tue, 5 Sep 2023 09:48:15 +0300 Subject: [PATCH] fix commands Signed-off-by: Daniel Grunberger --- cmd/image/README.md | 2 +- cmd/image/patch.go | 2 +- cmd/image/scan.go | 2 +- core/meta/datastructures/v1/patch.go | 2 +- core/pkg/resultshandling/printer/v2/prettyprinter/utils.go | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/image/README.md b/cmd/image/README.md index e305c899..ad1927b3 100644 --- a/cmd/image/README.md +++ b/cmd/image/README.md @@ -113,7 +113,7 @@ The patch command can be run in 2 ways: ```bash sudo buildkitd & - sudo kubescape patch --image + sudo kubescape image patch ``` 2. **Without sudo privileges** diff --git a/cmd/image/patch.go b/cmd/image/patch.go index 6273bc6d..7224d63b 100644 --- a/cmd/image/patch.go +++ b/cmd/image/patch.go @@ -35,7 +35,7 @@ func getPatchCmd(ks meta.IKubescape, scanInfo *cautils.ScanInfo, imgCredentials patchCmd := &cobra.Command{ Use: "patch : [flags]", Short: "Patch container images with vulnerabilities ", - Long: `Patch command is for automatically patching images with vulnerabilities.`, + Long: `Automatically patch container images with vulnerabilities`, Example: patchCmdExamples, Args: func(cmd *cobra.Command, args []string) error { if len(args) != 1 { diff --git a/cmd/image/scan.go b/cmd/image/scan.go index 2aceb022..9478c6bb 100644 --- a/cmd/image/scan.go +++ b/cmd/image/scan.go @@ -19,7 +19,7 @@ var ( Scan an image for vulnerabilities. # Scan the 'nginx' image - %[1]s scan image "nginx" + %[1]s image scan "nginx" `, cautils.ExecName()) ) diff --git a/core/meta/datastructures/v1/patch.go b/core/meta/datastructures/v1/patch.go index 793d1531..59013a44 100644 --- a/core/meta/datastructures/v1/patch.go +++ b/core/meta/datastructures/v1/patch.go @@ -12,7 +12,7 @@ type PatchInfo struct { Username string // username for registry login Password string // password for registry login - // registry.com/namespace/: + // registry.com/namespace/: ImageName string // image name ImageTag string // image tag } diff --git a/core/pkg/resultshandling/printer/v2/prettyprinter/utils.go b/core/pkg/resultshandling/printer/v2/prettyprinter/utils.go index c52adaac..862d1a2f 100644 --- a/core/pkg/resultshandling/printer/v2/prettyprinter/utils.go +++ b/core/pkg/resultshandling/printer/v2/prettyprinter/utils.go @@ -227,11 +227,11 @@ func printImageScanningSummary(writer *os.File, summary imageprinter.ImageScanSu func printImagesCommands(writer *os.File, summary imageprinter.ImageScanSummary) { if len(summary.Images) > 3 { - cautils.SimpleDisplay(writer, "Receive full report by running: kubescape scan image \n") + cautils.SimpleDisplay(writer, "Receive full report by running: kubescape image scan \n") } else { for _, img := range summary.Images { imgWithoutTag := strings.Split(img, ":")[0] - cautils.SimpleDisplay(writer, fmt.Sprintf("Receive full report for %s image by running: %s\n", imgWithoutTag, getCallToActionString(fmt.Sprintf("'$ kubescape scan image %s'", img)))) + cautils.SimpleDisplay(writer, fmt.Sprintf("Receive full report for %s image by running: %s\n", imgWithoutTag, getCallToActionString(fmt.Sprintf("'$ kubescape image scan %s'", img)))) } }