contrib: Show feature line only if there's a vuln in analyze-local-images

This commit is contained in:
Quentin Machu 2016-03-17 13:03:12 -04:00
parent 19b730ea67
commit 93ffc5a1e5

View File

@ -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)
}