Add binary classifier for ArangoDB (#2830)

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
Laurent Goderre 2024-05-07 12:06:32 -04:00 committed by GitHub
parent 78625164c6
commit e7b6284039
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 27 additions and 0 deletions

View File

@ -37,6 +37,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
logicalFixture string logicalFixture string
expected pkg.Package expected pkg.Package
}{ }{
{
logicalFixture: "arangodb/3.11.8/linux-amd64",
expected: pkg.Package{
Name: "arangodb",
Version: "3.11.8",
Type: "binary",
PURL: "pkg:generic/arangodb@3.11.8",
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

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

View File

@ -270,6 +270,13 @@ from-images:
# paths: # paths:
# - /usr/bin/perl # - /usr/bin/perl
- name: arangodb
version: 3.11.8
images:
- ref: arangodb:3.11.8@sha256:16893e767f47d28e3297839637741e5c4023e815adf860dfc674e1a36c7c7db0
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