fix: traefik binary classifier (#4499)

Signed-off-by: Rez Moss <hi@rezmoss.com>
This commit is contained in:
Rez Moss 2026-01-05 11:14:00 -05:00 committed by GitHub
parent 488511f69d
commit 2c96279df9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 19 additions and 1 deletions

View File

@ -227,6 +227,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
Metadata: metadata("traefik-binary"),
},
},
{
logicalFixture: "traefik/3.6.5/linux-amd64",
expected: pkg.Package{
Name: "traefik",
Version: "3.6.5",
Type: "binary",
PURL: "pkg:generic/traefik@3.6.5",
Locations: locations("traefik"),
Metadata: metadata("traefik-binary"),
},
},
{
logicalFixture: "memcached/1.6.18/linux-amd64",
expected: pkg.Package{

View File

@ -224,7 +224,7 @@ func DefaultClassifiers() []binutils.Classifier {
// [NUL]v1.7.34[NUL]
// [NUL]2.9.6[NUL]
// 3.0.4[NUL]
`(?m)(\x00|\x{FFFD})?v?(?P<version>[0-9]+\.[0-9]+\.[0-9]+(-alpha[0-9]|-beta[0-9]|-rc[0-9])?)\x00`),
`(?m)(\x00v?|\x{FFFD}.?)(?P<version>[0-9]+\.[0-9]+\.[0-9]+(-alpha[0-9]|-beta[0-9]|-rc[0-9])?)\x00`),
Package: "traefik",
PURL: mustPURL("pkg:generic/traefik@version"),
CPEs: singleCPE("cpe:2.3:a:traefik:traefik:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),

View File

@ -587,6 +587,13 @@ from-images:
paths:
- /usr/local/bin/traefik
- version: 3.6.5
images:
- ref: traefik:v3.6.5@sha256:d944e3693bbf5a361ddd2e411bb713049cfb4f5ff3da200b30ee7a347dbd6abd
platform: linux/amd64
paths:
- /usr/local/bin/traefik
# from the original dynamic fixtures...
- name: python-rhel-shared-libs