fix: add missing purl for busybox (#2457)

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
Laurent Goderre 2024-01-04 14:51:56 -05:00 committed by GitHub
parent c72d295719
commit bf39456fbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -540,6 +540,7 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
expected: pkg.Package{
Name: "busybox",
Version: "3.33.3",
PURL: "pkg:generic/busybox@3.33.3",
Locations: locations("["), // note: busybox is a link to [
Metadata: metadata("busybox-binary", "[", "busybox"),
},
@ -809,6 +810,7 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases_Image(t *testing.T) {
expected: pkg.Package{
Name: "busybox",
Version: "1.35.0",
PURL: "pkg:generic/busybox@1.35.0",
Locations: locations("/bin/["),
Metadata: metadata("busybox-binary", "/bin/[", "/bin/busybox"),
},

View File

@ -131,6 +131,7 @@ var defaultClassifiers = []classifier{
EvidenceMatcher: fileContentsVersionMatcher(
`(?m)BusyBox\s+v(?P<version>[0-9]+\.[0-9]+\.[0-9]+)`),
Package: "busybox",
PURL: mustPURL("pkg:generic/busybox@version"),
CPEs: singleCPE("cpe:2.3:a:busybox:busybox:*:*:*:*:*:*:*:*"),
},
{