Skip to content

Commit 78fc6ad

Browse files
committed
fixed cpe libxml2 , fixed #5015
Signed-off-by: Rez Moss <hi@rezmoss.com>
1 parent fe42bce commit 78fc6ad

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

syft/pkg/cataloger/internal/cpegenerate/candidate_by_package_type.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,11 @@ var defaultCandidateAdditions = buildCandidateLookup(
508508
candidateKey{PkgName: "poco"},
509509
candidateAddition{AdditionalVendors: []string{"pocoproject"}},
510510
},
511+
{
512+
pkg.ConanPkg,
513+
candidateKey{PkgName: "libxml2"},
514+
candidateAddition{AdditionalVendors: []string{"xmlsoft"}},
515+
},
511516
})
512517

513518
var defaultCandidateRemovals = buildCandidateRemovalLookup(

syft/pkg/cataloger/internal/cpegenerate/candidate_by_package_type_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,8 @@ func Test_findProductsToRemove(t *testing.T) {
232232
})
233233
}
234234
}
235+
236+
func Test_defaultCandidateAdditions_conan_libxml2(t *testing.T) {
237+
vendors := findAdditionalVendors(defaultCandidateAdditions, pkg.ConanPkg, "libxml2", "")
238+
assert.Contains(t, vendors, "xmlsoft")
239+
}

0 commit comments

Comments
 (0)