fix: detection of arangodb 3.12 (#2979)

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
Laurent Goderre 2024-06-20 11:11:03 -04:00 committed by GitHub
parent 246df97ae7
commit 7a35de04ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 19 additions and 1 deletions

View File

@ -48,6 +48,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
Metadata: metadata("arangodb-binary"), Metadata: metadata("arangodb-binary"),
}, },
}, },
{
logicalFixture: "arangodb/3.12.0-2/linux-amd64",
expected: pkg.Package{
Name: "arangodb",
Version: "3.12.0-2",
Type: "binary",
PURL: "pkg:generic/arangodb@3.12.0-2",
Locations: locations("arangosh"),
Metadata: metadata("arangodb-binary"),
},
},
{ {
logicalFixture: "postgres/15beta4/linux-amd64", logicalFixture: "postgres/15beta4/linux-amd64",
expected: pkg.Package{ expected: pkg.Package{

View File

@ -272,7 +272,7 @@ func DefaultClassifiers() []Classifier {
Class: "arangodb-binary", Class: "arangodb-binary",
FileGlob: "**/arangosh", FileGlob: "**/arangosh",
EvidenceMatcher: FileContentsVersionMatcher( EvidenceMatcher: FileContentsVersionMatcher(
`(?m)ArangoDB\s\x00*(?P<version>[0-9]+\.[0-9]+\.[0-9]+)\s\[linux\]`), `(?m)\x00*(?P<version>[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?)\s\[linux\]`),
Package: "arangodb", Package: "arangodb",
PURL: mustPURL("pkg:generic/arangodb@version"), PURL: mustPURL("pkg:generic/arangodb@version"),
CPEs: singleCPE("cpe:2.3:a:arangodb:arangodb:*:*:*:*:*:*:*:*"), CPEs: singleCPE("cpe:2.3:a:arangodb:arangodb:*:*:*:*:*:*:*:*"),

View File

@ -285,6 +285,13 @@ from-images:
platform: linux/amd64 platform: linux/amd64
paths: paths:
- /usr/bin/arangosh - /usr/bin/arangosh
- name: arangodb
version: 3.12.0-2
images:
- ref: arangodb:3.12.0.2@sha256:6ba2e4284cd0f4835e3ef034be90fb947c3d61225d65d07e3b2d2d893e47de25
platform: linux/amd64
paths:
- /usr/bin/arangosh
- version: 15.1 - version: 15.1
images: images:
- ref: postgres:15.1@sha256:b4140dd3a62f364f16a82c1bd88d28b9887ecb47f07dbe2941237d073574d428 - ref: postgres:15.1@sha256:b4140dd3a62f364f16a82c1bd88d28b9887ecb47f07dbe2941237d073574d428