You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internal/core/vuln/license_risk_service.go
+8-12Lines changed: 8 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -38,19 +38,15 @@ func (service *LicenseRiskService) FindLicenseRisksInComponents(assetVersion mod
38
38
}
39
39
40
40
// get all current valid licenses to compare against
41
-
licenses, err:=GetOSILicenses()
41
+
licenseMap, err:=GetOSILicenses()
42
42
iferr!=nil {
43
43
returnerr
44
44
}
45
-
licenseMap:=make(map[string]struct{})
46
-
fori:=rangelicenses {
47
-
licenseMap[licenses[i]] =struct{}{}
48
-
}
49
45
50
46
//collect all risks before saving to the database, should be more efficient
51
47
allLicenseRisks:= []models.LicenseRisk{}
52
48
allVulnEvents:= []models.VulnEvent{}
53
-
//go over every component and check if the license if the license is a valid osi license; if not we can create a license risk with the provided information
49
+
//go over every component and check if the license is a valid osi license; if not we can create a license risk with the provided information
0 commit comments