fix: update arangodb classifier and capture-snippet.sh (#4662)

Signed-off-by: witchcraze <witchcraze@gmail.com>
This commit is contained in:
witchcraze 2026-03-24 05:29:39 +09:00 committed by GitHub
parent 834ddcb1c0
commit 7800b16529
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 38 additions and 2 deletions

View File

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

View File

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

View File

@ -151,4 +151,4 @@ while $CONTINUE_LOOP; do
done
go run ./manager write-snippet "$BINARY_FILE" --offset "$OFFSET" --length "$LENGTH" --name "$GROUP_NAME" --version "$VERSION"
go run ../internal/manager write-snippet "$BINARY_FILE" --offset "$OFFSET" --length "$LENGTH" --name "$GROUP_NAME" --version "$VERSION"

View File

@ -458,6 +458,20 @@ from-images:
platform: linux/amd64
paths:
- /usr/bin/arangosh
- name: arangodb
version: 3.12.5
images:
- ref: arangodb:3.12.5@sha256:1f9278fe17b200cf3aea2c7bd7fd571221b5b41a49b835a397c47eb970c952d6
platform: linux/amd64
paths:
- /usr/bin/arangosh
- name: arangodb
version: 3.12.5-2
images:
- ref: arangodb:3.12.5.2@sha256:5b0d1d2911ea864ea61d7e2357789004fe912606f5980cf481739601d7cb17a1
platform: linux/amd64
paths:
- /usr/bin/arangosh
- version: 15.1
images:
- ref: postgres:15.1@sha256:b4140dd3a62f364f16a82c1bd88d28b9887ecb47f07dbe2941237d073574d428