diff --git a/syft/pkg/cataloger/binary/classifier_cataloger_test.go b/syft/pkg/cataloger/binary/classifier_cataloger_test.go index 69bce23a5..4f930f52d 100644 --- a/syft/pkg/cataloger/binary/classifier_cataloger_test.go +++ b/syft/pkg/cataloger/binary/classifier_cataloger_test.go @@ -1183,6 +1183,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) { Metadata: metadata("openssl-binary"), }, }, + { + logicalFixture: "openssl/1.1.1zb/linux-arm64", + expected: pkg.Package{ + Name: "openssl", + Version: "1.1.1zb", + Type: "binary", + PURL: "pkg:generic/openssl@1.1.1zb", + Locations: locations("openssl"), + Metadata: metadata("openssl-binary"), + }, + }, { logicalFixture: "gcc/12.3.0/linux-amd64", expected: pkg.Package{ diff --git a/syft/pkg/cataloger/binary/classifiers.go b/syft/pkg/cataloger/binary/classifiers.go index b680c2c2a..f7df60222 100644 --- a/syft/pkg/cataloger/binary/classifiers.go +++ b/syft/pkg/cataloger/binary/classifiers.go @@ -493,7 +493,7 @@ func DefaultClassifiers() []binutils.Classifier { EvidenceMatcher: m.FileContentsVersionMatcher( // [NUL]OpenSSL 3.1.4' // [NUL]OpenSSL 1.1.1w' - `\x00OpenSSL (?P[0-9]+\.[0-9]+\.[0-9]+([a-z]|-alpha[0-9]|-beta[0-9]|-rc[0-9])?)`, + `\x00OpenSSL (?P[0-9]+\.[0-9]+\.[0-9]+([a-z]+|-alpha[0-9]|-beta[0-9]|-rc[0-9])?)`, ), Package: "openssl", PURL: mustPURL("pkg:generic/openssl@version"), diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/openssl/1.1.1zb/linux-arm64/openssl b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/openssl/1.1.1zb/linux-arm64/openssl new file mode 100644 index 000000000..2361e4478 Binary files /dev/null and b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/openssl/1.1.1zb/linux-arm64/openssl differ