Skip to content

Commit

Permalink
contrib: Show feature line only if there's a vuln in analyze-local-im…
Browse files Browse the repository at this point in the history
…ages
  • Loading branch information
Quentin-M committed Mar 17, 2016
1 parent 19b730e commit 93ffc5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/analyze-local-images/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

Expand Down

0 comments on commit 93ffc5a

Please sign in to comment.