Skip to content

Commit 49d8c40

Browse files
committed
fix merging
Signed-off-by: Vivek Kumar Sahu <vivekkumarsahu650@gmail.com>
1 parent 480e816 commit 49d8c40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/scvs/scvs.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func IsSBOMInventoryContainsTestComponents(_ sbom.Document, s *scvsScore) bool {
211211
func IsSBOMHasPrimaryComponents(d sbom.Document, s *scvsScore) bool {
212212
// get primaryComponentID: d.PrimaryComponent().GetID()
213213
// Update this after NTIA get's merged
214-
if d.PrimaryComponent() {
214+
if d.PrimaryComp().IsPresent() {
215215
s.setDesc("SBOM have primary comp")
216216
return true
217217
}
@@ -228,7 +228,7 @@ func IsComponentHasIdentityID(d sbom.Document, s *scvsScore) bool {
228228
}
229229

230230
withIdentityID := lo.CountBy(d.Components(), func(c sbom.GetComponent) bool {
231-
return len(c.Purls()) > 0 || len(c.Cpes()) > 0
231+
return len(c.GetPurls()) > 0 || len(c.GetCpes()) > 0
232232
})
233233

234234
if totalComponents > 0 {
@@ -250,7 +250,7 @@ func IsComponentHasOriginID(d sbom.Document, s *scvsScore) bool {
250250
}
251251

252252
withOriginID := lo.CountBy(d.Components(), func(c sbom.GetComponent) bool {
253-
return len(c.Purls()) > 0
253+
return len(c.GetPurls()) > 0
254254
})
255255

256256
if totalComponents > 0 {

0 commit comments

Comments
 (0)