mirror of
https://github.com/anchore/syft.git
synced 2026-03-30 05:33:24 +02:00
fix: update arangodb classifier and capture-snippet.sh (#4662)
Signed-off-by: witchcraze <witchcraze@gmail.com>
This commit is contained in:
parent
834ddcb1c0
commit
7800b16529
@ -61,6 +61,28 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
|||||||
Metadata: metadata("arangodb-binary"),
|
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",
|
logicalFixture: "postgres/15beta4/linux-amd64",
|
||||||
expected: pkg.Package{
|
expected: pkg.Package{
|
||||||
|
|||||||
@ -232,7 +232,7 @@ func DefaultClassifiers() []binutils.Classifier {
|
|||||||
Class: "arangodb-binary",
|
Class: "arangodb-binary",
|
||||||
FileGlob: "**/arangosh",
|
FileGlob: "**/arangosh",
|
||||||
EvidenceMatcher: m.FileContentsVersionMatcher(
|
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",
|
Package: "arangodb",
|
||||||
PURL: mustPURL("pkg:generic/arangodb@version"),
|
PURL: mustPURL("pkg:generic/arangodb@version"),
|
||||||
CPEs: singleCPE("cpe:2.3:a:arangodb:arangodb:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
CPEs: singleCPE("cpe:2.3:a:arangodb:arangodb:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
||||||
|
|||||||
@ -151,4 +151,4 @@ while $CONTINUE_LOOP; do
|
|||||||
|
|
||||||
done
|
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"
|
||||||
|
|||||||
BIN
syft/pkg/cataloger/binary/testdata/classifiers/snippets/arangodb/3.12.5-2/linux-amd64/arangosh
vendored
Normal file
BIN
syft/pkg/cataloger/binary/testdata/classifiers/snippets/arangodb/3.12.5-2/linux-amd64/arangosh
vendored
Normal file
Binary file not shown.
BIN
syft/pkg/cataloger/binary/testdata/classifiers/snippets/arangodb/3.12.5/linux-amd64/arangosh
vendored
Normal file
BIN
syft/pkg/cataloger/binary/testdata/classifiers/snippets/arangodb/3.12.5/linux-amd64/arangosh
vendored
Normal file
Binary file not shown.
14
syft/pkg/cataloger/binary/testdata/config.yaml
vendored
14
syft/pkg/cataloger/binary/testdata/config.yaml
vendored
@ -458,6 +458,20 @@ from-images:
|
|||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
paths:
|
paths:
|
||||||
- /usr/bin/arangosh
|
- /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
|
- version: 15.1
|
||||||
images:
|
images:
|
||||||
- ref: postgres:15.1@sha256:b4140dd3a62f364f16a82c1bd88d28b9887ecb47f07dbe2941237d073574d428
|
- ref: postgres:15.1@sha256:b4140dd3a62f364f16a82c1bd88d28b9887ecb47f07dbe2941237d073574d428
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user