mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
fix: dart classifier for 2.x and ARM (#3475)
Signed-off-by: witchcraze <witchcraze@gmail.com>
This commit is contained in:
parent
21df38798e
commit
2118295f19
@ -1067,6 +1067,28 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
||||
Metadata: metadata("swipl-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "dart/2.12.4/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "dart",
|
||||
Version: "2.12.4",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/dart@2.12.4",
|
||||
Locations: locations("dart"),
|
||||
Metadata: metadata("dart-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "dart/3.0.0/linux-arm",
|
||||
expected: pkg.Package{
|
||||
Name: "dart",
|
||||
Version: "3.0.0",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/dart@3.0.0",
|
||||
Locations: locations("dart"),
|
||||
Metadata: metadata("dart-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "dart/3.5.2/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
|
||||
@ -458,7 +458,11 @@ func DefaultClassifiers() []Classifier {
|
||||
Class: "dart-binary",
|
||||
FileGlob: "**/dart",
|
||||
EvidenceMatcher: FileContentsVersionMatcher(
|
||||
`(?m)Dart,GC"\x00(?P<version>[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+(\.[0-9]+)?\.beta)?) `,
|
||||
// MathAtan[NUL]2.12.4 (stable)
|
||||
// "%s"[NUL]3.0.0 (stable)
|
||||
// Dart,GC"[NUL]3.5.2 (stable)
|
||||
// Dart,GC"[NUL]3.6.0-216.1.beta (beta)
|
||||
`(?m)\x00(?P<version>[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+(\.[0-9]+)?\.beta)?) `,
|
||||
),
|
||||
Package: "dart",
|
||||
PURL: mustPURL("pkg:generic/dart@version"),
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -78,6 +78,21 @@ from-images:
|
||||
paths:
|
||||
- /usr/lib/swipl/bin/x86_64-linux/swipl
|
||||
|
||||
- version: 2.12.4
|
||||
images:
|
||||
- ref: dart:2.12.4-sdk@sha256:0da5d8c9727f5b90e585bcc55a078d981029f4e13044f206299e00f23993a4a8
|
||||
platform: linux/amd64
|
||||
|
||||
paths:
|
||||
- /usr/lib/dart/bin/dart
|
||||
|
||||
- version: 3.0.0
|
||||
images:
|
||||
- ref: dart:3.0.0-sdk@sha256:67708c6011199d59336bf6cd0f9e618e55dd3632c79a43375f5a082795f0b724
|
||||
platform: linux/arm
|
||||
paths:
|
||||
- /usr/lib/dart/bin/dart
|
||||
|
||||
- version: 3.5.2
|
||||
images:
|
||||
- ref: dart:3.5.2@sha256:1fd62cb5036bdc42de89bdae747683277986639be9b0b0a0751d2c50bbd9441f
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user