mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
fix: support multiple letters in openssl patch version (#4106)
Signed-off-by: honigbot <thesoftbear@gmail.com>
This commit is contained in:
parent
9f956dca8f
commit
80e61175ad
@ -1183,6 +1183,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
|||||||
Metadata: metadata("openssl-binary"),
|
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",
|
logicalFixture: "gcc/12.3.0/linux-amd64",
|
||||||
expected: pkg.Package{
|
expected: pkg.Package{
|
||||||
|
|||||||
@ -493,7 +493,7 @@ func DefaultClassifiers() []binutils.Classifier {
|
|||||||
EvidenceMatcher: m.FileContentsVersionMatcher(
|
EvidenceMatcher: m.FileContentsVersionMatcher(
|
||||||
// [NUL]OpenSSL 3.1.4'
|
// [NUL]OpenSSL 3.1.4'
|
||||||
// [NUL]OpenSSL 1.1.1w'
|
// [NUL]OpenSSL 1.1.1w'
|
||||||
`\x00OpenSSL (?P<version>[0-9]+\.[0-9]+\.[0-9]+([a-z]|-alpha[0-9]|-beta[0-9]|-rc[0-9])?)`,
|
`\x00OpenSSL (?P<version>[0-9]+\.[0-9]+\.[0-9]+([a-z]+|-alpha[0-9]|-beta[0-9]|-rc[0-9])?)`,
|
||||||
),
|
),
|
||||||
Package: "openssl",
|
Package: "openssl",
|
||||||
PURL: mustPURL("pkg:generic/openssl@version"),
|
PURL: mustPURL("pkg:generic/openssl@version"),
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user