mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
feat: classifier for Dart lang binaries (#3265)
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
parent
963ea594c8
commit
7815d8e4d9
@ -961,6 +961,28 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
||||
Metadata: metadata("swipl-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "dart/3.5.2/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "dart",
|
||||
Version: "3.5.2",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/dart@3.5.2",
|
||||
Locations: locations("dart"),
|
||||
Metadata: metadata("dart-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "dart/3.6.0-216.1.beta/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "dart",
|
||||
Version: "3.6.0-216.1.beta",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/dart@3.6.0-216.1.beta",
|
||||
Locations: locations("dart"),
|
||||
Metadata: metadata("dart-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "haskell-ghc/9.6.5/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
|
||||
@ -447,6 +447,16 @@ func DefaultClassifiers() []Classifier {
|
||||
PURL: mustPURL("pkg:generic/swipl@version"),
|
||||
CPEs: singleCPE("cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
||||
},
|
||||
{
|
||||
Class: "dart-binary",
|
||||
FileGlob: "**/dart",
|
||||
EvidenceMatcher: FileContentsVersionMatcher(
|
||||
`(?m)Dart,GC"\x00(?P<version>[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+(\.[0-9]+)?\.beta)?) `,
|
||||
),
|
||||
Package: "dart",
|
||||
PURL: mustPURL("pkg:generic/dart@version"),
|
||||
CPEs: singleCPE("cpe:2.3:a:dart:dart_software_development_kit:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
||||
},
|
||||
{
|
||||
Class: "haskell-ghc-binary",
|
||||
FileGlob: "**/ghc*",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -78,6 +78,20 @@ from-images:
|
||||
paths:
|
||||
- /usr/lib/swipl/bin/x86_64-linux/swipl
|
||||
|
||||
- version: 3.5.2
|
||||
images:
|
||||
- ref: dart:3.5.2@sha256:1fd62cb5036bdc42de89bdae747683277986639be9b0b0a0751d2c50bbd9441f
|
||||
platform: linux/amd64
|
||||
paths:
|
||||
- /usr/lib/dart/bin/dart
|
||||
|
||||
- version: 3.6.0-216.1.beta
|
||||
images:
|
||||
- ref: dart:3.6.0-216.1.beta@sha256:f4211fec53f972987f5bc1dd0ffd3d3cb1fd820ac1ade4e45a7a0c7bffd71d58
|
||||
platform: linux/amd64
|
||||
paths:
|
||||
- /usr/lib/dart/bin/dart
|
||||
|
||||
- name: haskell-ghc
|
||||
version: 9.6.5
|
||||
images:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user