From 82d9c61389aa83050de158a9beaeb756b8314e20 Mon Sep 17 00:00:00 2001 From: Daman Date: Wed, 1 Mar 2023 14:15:56 +0530 Subject: [PATCH] regex update: added start anchor and trailing "\" to prevent false positives --- cmd/community_images/cli/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/community_images/cli/root.go b/cmd/community_images/cli/root.go index e0e71e4..67bef46 100644 --- a/cmd/community_images/cli/root.go +++ b/cmd/community_images/cli/root.go @@ -70,7 +70,7 @@ func RootCmd() *cobra.Command { config, _ := KubernetesConfigFlags.ToRESTConfig() log.Header(headerLine(config.Host)) - re := regexp.MustCompile(`k8s\.gcr\.io|gcr\.io/google-containers`) + re := regexp.MustCompile(`^k8s\.gcr\.io/|^gcr\.io/google-containers`) for _, runningImage := range imagesList { image := imageWithTag(runningImage) log.StartImageLine(image)