add in a sum for total errors. 0 return 1 when there are any errors, so that it can break our CI pipeline when needed
This commit is contained in:
parent
84f74fa1ee
commit
cca55ed764
@ -270,7 +270,10 @@ func AnalyzeLocalImage(imageName string, minSeverity types.Priority, endpoint, m
|
||||
fmt.Printf("%s No vulnerabilities were detected in your image\n", color.GreenString("Success!"))
|
||||
} else if !hasVisibleVulnerabilities {
|
||||
fmt.Printf("%s No vulnerabilities matching the minimum severity level were detected in your image\n", color.YellowString("NOTE:"))
|
||||
}
|
||||
} else {
|
||||
errorTotal := errors.New("total Errors: "+strconv.Itoa(len(vulnerabilities)))
|
||||
return errorTotal
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user