diff --git a/syft/pkg/cataloger/binary/classifier_cataloger_test.go b/syft/pkg/cataloger/binary/classifier_cataloger_test.go index dcc9849c675..67c47144b87 100644 --- a/syft/pkg/cataloger/binary/classifier_cataloger_test.go +++ b/syft/pkg/cataloger/binary/classifier_cataloger_test.go @@ -1039,6 +1039,28 @@ func Test_Cataloger_PositiveCases(t *testing.T) { Metadata: metadata("wordpress-cli-binary"), }, }, + { + logicalFixture: "chrome/126.0.6478.182/linux-amd64", + expected: pkg.Package{ + Name: "chrome", + Version: "126.0.6478.182", + Type: "binary", + PURL: "pkg:generic/chrome@126.0.6478.182", + Locations: locations("chrome"), + Metadata: metadata("chrome-binary"), + }, + }, + { + logicalFixture: "chrome/127.0.6533.119/linux-amd64", + expected: pkg.Package{ + Name: "chrome", + Version: "127.0.6533.119", + Type: "binary", + PURL: "pkg:generic/chrome@127.0.6533.119", + Locations: locations("chrome"), + Metadata: metadata("chrome-binary"), + }, + }, } for _, test := range tests { diff --git a/syft/pkg/cataloger/binary/classifiers.go b/syft/pkg/cataloger/binary/classifiers.go index 0d491f25feb..74e423a2c8e 100644 --- a/syft/pkg/cataloger/binary/classifiers.go +++ b/syft/pkg/cataloger/binary/classifiers.go @@ -525,6 +525,17 @@ func DefaultClassifiers() []Classifier { PURL: mustPURL("pkg:generic/wp-cli@version"), CPEs: singleCPE("cpe:2.3:a:wp-cli:wp-cli:*:*:*:*:*:*:*:*"), }, + { + Class: "chrome-binary", + FileGlob: "**/chrome", + EvidenceMatcher: FileContentsVersionMatcher( + // [NUL]127.0.6533.119[NUL]Default + `\x00(?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\x00Default`, + ), + Package: "chrome", + PURL: mustPURL("pkg:generic/chrome@version"), + CPEs: singleCPE("cpe:2.3:a:google:chrome:*:*:*:*:*:*:*:*"), + }, } } diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/chrome/126.0.6478.182/linux-amd64/chrome b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/chrome/126.0.6478.182/linux-amd64/chrome new file mode 100644 index 00000000000..14c0dca81c4 Binary files /dev/null and b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/chrome/126.0.6478.182/linux-amd64/chrome differ diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/chrome/127.0.6533.119/linux-amd64/chrome b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/chrome/127.0.6533.119/linux-amd64/chrome new file mode 100644 index 00000000000..8289ce3fbd4 Binary files /dev/null and b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/chrome/127.0.6533.119/linux-amd64/chrome differ