From 93ffc5a1e5052bba2b7ddeb28b2414e6025c8b3d Mon Sep 17 00:00:00 2001 From: Quentin Machu Date: Thu, 17 Mar 2016 13:03:12 -0400 Subject: [PATCH] contrib: Show feature line only if there's a vuln in analyze-local-images --- contrib/analyze-local-images/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/analyze-local-images/main.go b/contrib/analyze-local-images/main.go index a82c6c1b..04db181a 100644 --- a/contrib/analyze-local-images/main.go +++ b/contrib/analyze-local-images/main.go @@ -135,8 +135,6 @@ func main() { isSafe := true for _, feature := range layer.Features { - fmt.Printf("## Feature: %s %s (%s)\n", feature.Name, feature.Version, feature.NamespaceName) - if len(feature.Vulnerabilities) > 0 { isFirstVulnerability := true @@ -148,6 +146,8 @@ func main() { if isFirstVulnerability { isSafe = false isFirstVulnerability = false + + fmt.Printf("## Feature: %s %s (%s)\n", feature.Name, feature.Version, feature.NamespaceName) fmt.Printf(" - Added by layer: %s\n", feature.AddedBy) }