mirror of
https://github.com/anchore/syft.git
synced 2026-05-20 12:15:27 +02:00
added deno bin classifiers (#4677)
Signed-off-by: Rez Moss <hi@rezmoss.com>
This commit is contained in:
parent
c09f42e024
commit
722e3f267b
@ -342,6 +342,16 @@ catalogers:
|
||||
cpes:
|
||||
- cpe:2.3:a:dart:dart_software_development_kit:*:*:*:*:*:*:*:*
|
||||
type: BinaryPkg
|
||||
- method: glob
|
||||
criteria:
|
||||
- '**/deno'
|
||||
packages:
|
||||
- class: deno-binary
|
||||
name: deno
|
||||
purl: pkg:generic/deno
|
||||
cpes:
|
||||
- cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*
|
||||
type: BinaryPkg
|
||||
- method: glob
|
||||
criteria:
|
||||
- '**/ghc*'
|
||||
|
||||
@ -1254,6 +1254,39 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
||||
Metadata: metadata("dart-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "deno/1.41.0/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "deno",
|
||||
Version: "1.41.0",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/deno@1.41.0",
|
||||
Locations: locations("deno"),
|
||||
Metadata: metadata("deno-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "deno/2.0.0/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "deno",
|
||||
Version: "2.0.0",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/deno@2.0.0",
|
||||
Locations: locations("deno"),
|
||||
Metadata: metadata("deno-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "deno/2.6.3/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "deno",
|
||||
Version: "2.6.3",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/deno@2.6.3",
|
||||
Locations: locations("deno"),
|
||||
Metadata: metadata("deno-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "haskell-ghc/9.6.5/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
|
||||
@ -424,6 +424,17 @@ func DefaultClassifiers() []binutils.Classifier {
|
||||
PURL: mustPURL("pkg:generic/dart@version"),
|
||||
CPEs: singleCPE("cpe:2.3:a:dart:dart_software_development_kit:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
||||
},
|
||||
{
|
||||
Class: "deno-binary",
|
||||
FileGlob: "**/deno",
|
||||
EvidenceMatcher: m.FileContentsVersionMatcher(
|
||||
// Deno/2.6.3
|
||||
// Deno/1.41.0
|
||||
`Deno/(?P<version>[0-9]+\.[0-9]+\.[0-9]+)`),
|
||||
Package: "deno",
|
||||
PURL: mustPURL("pkg:generic/deno@version"),
|
||||
CPEs: singleCPE("cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
||||
},
|
||||
{
|
||||
Class: "haskell-ghc-binary",
|
||||
FileGlob: "**/ghc*",
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
name: deno
|
||||
offset: 17775514
|
||||
length: 100
|
||||
snippetSha256: 1bf995efbcf158531b2cde0a0213b348e189550a45d1db127b54eded4c520d0a
|
||||
fileSha256: b0877de86c74027327fca3ca37a5ac3780bcc9c70579ecf6c7c9a55d22147aef
|
||||
|
||||
### byte snippet to follow ###
|
||||
t recognize flag ''
|
||||
Deno/1.41.0cli/worker.rsmain_module deno::worker[ext:cli/worker.rs:191:37][ext:c
|
||||
@ -0,0 +1,8 @@
|
||||
name: deno
|
||||
offset: 19199775
|
||||
length: 100
|
||||
snippetSha256: a5411a3e2856c4351f97e9d5f50f78227da85640f50e436913b0bcb0f12d3216
|
||||
fileSha256: 097ca199e64f5cd67318cdd3750ab3da9374edeaa205032b74c905f8c99901a6
|
||||
|
||||
### byte snippet to follow ###
|
||||
denover2.0.0+a62c7e0Deno/2.0.0Deno/2.0.0+a62c7e0a62c7e036ab6851c0293f407ead635a7331445b75.6.2cli/wor
|
||||
@ -0,0 +1,8 @@
|
||||
name: deno
|
||||
offset: 21186310
|
||||
length: 100
|
||||
snippetSha256: b6dd3f1b71effaba81c4d1aa77a7769d1cafbd5857564e2f3529e293c7f0db80
|
||||
fileSha256: 644b733f21383c5eea7b27dcb5d81c3e2a94d18287c6b11e9771335b51e8438d
|
||||
|
||||
### byte snippet to follow ###
|
||||
ts2.6.32.6.3+3fbb1daDeno/2.6.3Deno/2.6.3+3fbb1da3fbb1daddbc9333cddf0d8c0735811717dd70f7a5.9.2Missing
|
||||
24
syft/pkg/cataloger/binary/testdata/config.yaml
vendored
24
syft/pkg/cataloger/binary/testdata/config.yaml
vendored
@ -123,6 +123,30 @@ from-images:
|
||||
paths:
|
||||
- /usr/lib/dart/bin/dart
|
||||
|
||||
- name: deno
|
||||
version: 1.41.0
|
||||
images:
|
||||
- ref: denoland/deno:1.41.0
|
||||
platform: linux/amd64
|
||||
paths:
|
||||
- /usr/bin/deno
|
||||
|
||||
- name: deno
|
||||
version: 2.0.0
|
||||
images:
|
||||
- ref: denoland/deno:2.0.0
|
||||
platform: linux/amd64
|
||||
paths:
|
||||
- /usr/bin/deno
|
||||
|
||||
- name: deno
|
||||
version: 2.6.3
|
||||
images:
|
||||
- ref: denoland/deno:2.6.3
|
||||
platform: linux/amd64
|
||||
paths:
|
||||
- /usr/bin/deno
|
||||
|
||||
- name: haskell-ghc
|
||||
version: 9.6.5
|
||||
images:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user