fix commands

Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
This commit is contained in:
Daniel Grunberger
2023-09-05 09:48:15 +03:00
parent 2606042768
commit eddbed4363
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ The patch command can be run in 2 ways:
```bash
sudo buildkitd &
sudo kubescape patch --image <image-name>
sudo kubescape image patch <image>
```
2. **Without sudo privileges**
+1 -1
View File
@@ -35,7 +35,7 @@ func getPatchCmd(ks meta.IKubescape, scanInfo *cautils.ScanInfo, imgCredentials
patchCmd := &cobra.Command{
Use: "patch <image>:<tag> [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 {
+1 -1
View File
@@ -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())
)
+1 -1
View File
@@ -12,7 +12,7 @@ type PatchInfo struct {
Username string // username for registry login
Password string // password for registry login
// registry.com/namespace/<image-name>:<image-tag>
// registry.com/namespace/<image>:<tag>
ImageName string // image name
ImageTag string // image tag
}
@@ -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 <image>\n")
cautils.SimpleDisplay(writer, "Receive full report by running: kubescape image scan <image>\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))))
}
}