fix: match OpenSSL letter releases (#2682)

* chore: match openssl 1.1 letter releases

Signed-off-by: Harm Weites <harm@weites.com>

* chore: include image sha

Signed-off-by: Harm Weites <harm@weites.com>

---------

Signed-off-by: Harm Weites <harm@weites.com>
This commit is contained in:
Harm Weites 2024-02-29 15:39:23 +01:00 committed by GitHub
parent 6377465440
commit 356f7c92b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 21 additions and 1 deletions

View File

@ -864,6 +864,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
Metadata: metadata("openssl-binary"),
},
},
{
logicalFixture: "openssl/1.1.1w/linux-arm64",
expected: pkg.Package{
Name: "openssl",
Version: "1.1.1w",
Type: "binary",
PURL: "pkg:generic/openssl@1.1.1w",
Locations: locations("openssl"),
Metadata: metadata("openssl-binary"),
},
},
{
logicalFixture: "gcc/12.3.0/linux-amd64",
expected: pkg.Package{

View File

@ -386,7 +386,8 @@ func DefaultClassifiers() []Classifier {
FileGlob: "**/openssl",
EvidenceMatcher: FileContentsVersionMatcher(
// [NUL]OpenSSL 3.1.4'
`\x00OpenSSL (?P<version>[0-9]+\.[0-9]+\.[0-9]+(-alpha[0-9]|-beta[0-9]|-rc[0-9])?)`,
// [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])?)`,
),
Package: "openssl",
PURL: mustPURL("pkg:generic/openssl@version"),

View File

@ -462,3 +462,11 @@ from-images:
platform: linux/amd64
paths:
- /bin/consul
- name: openssl
version: 1.1.1w
images:
- ref: openresty/openresty:1.25.3.1-2-alpine@sha256:b1cb45b1556801b8cb1bc29ea78faf2eaf67926a37b052dd070866e44d7df07a
platform: linux/arm64
paths:
- /usr/local/openresty/openssl/bin/openssl