mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
fix commands
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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())
|
||||
)
|
||||
|
||||
|
||||
@@ -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))))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user