mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 00:43:20 +01:00
Add binary classifier for the ERLang interpretter (#2417)
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
parent
51d3cd0066
commit
a635d66657
@ -715,6 +715,18 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
|
|||||||
Metadata: metadata("consul-binary"),
|
Metadata: metadata("consul-binary"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "positive-erlang-25.3.2.7",
|
||||||
|
fixtureDir: "test-fixtures/classifiers/positive/erlang-25.3.2.7",
|
||||||
|
expected: pkg.Package{
|
||||||
|
Name: "erlang",
|
||||||
|
Version: "25.3.2.7",
|
||||||
|
Type: "binary",
|
||||||
|
PURL: "pkg:generic/erlang@25.3.2.7",
|
||||||
|
Locations: locations("erlexec"),
|
||||||
|
Metadata: metadata("erlang-binary"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "positive-nginx-1.25.1",
|
name: "positive-nginx-1.25.1",
|
||||||
fixtureDir: "test-fixtures/classifiers/positive/nginx-1.25.1",
|
fixtureDir: "test-fixtures/classifiers/positive/nginx-1.25.1",
|
||||||
|
|||||||
@ -283,6 +283,17 @@ var defaultClassifiers = []classifier{
|
|||||||
PURL: mustPURL("pkg:generic/ruby@version"),
|
PURL: mustPURL("pkg:generic/ruby@version"),
|
||||||
CPEs: singleCPE("cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*"),
|
CPEs: singleCPE("cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Class: "erlang-binary",
|
||||||
|
FileGlob: "**/erlexec",
|
||||||
|
EvidenceMatcher: fileContentsVersionMatcher(
|
||||||
|
// <artificial>[NUL]/usr/local/src/otp-25.3.2.7/erts/
|
||||||
|
`(?m)\<artificial\>\x00/usr/local/src/otp-(?P<version>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+?)/erts/`,
|
||||||
|
),
|
||||||
|
Package: "erlang",
|
||||||
|
PURL: mustPURL("pkg:generic/erlang@version"),
|
||||||
|
CPEs: singleCPE("cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Class: "consul-binary",
|
Class: "consul-binary",
|
||||||
FileGlob: "**/consul",
|
FileGlob: "**/consul",
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user