Sorted PackageInfos by Name to keep report texts same every times

This commit is contained in:
yoheimuta
2016-11-22 01:11:42 +09:00
parent 46f96740a2
commit e6de7aa9ca
3 changed files with 122 additions and 1 deletions

View File

@@ -226,6 +226,8 @@ func (l base) isAwsInstanceID(str string) bool {
func (l *base) convertToModel() (models.ScanResult, error) {
var scoredCves, unscoredCves, ignoredCves models.CveInfos
for _, p := range l.UnsecurePackages {
sort.Sort(models.PackageInfosByName(p.Packs))
// ignoreCves
found := false
for _, icve := range l.getServerInfo().IgnoreCves {