mirror of
https://github.com/anchore/syft
synced 2024-11-10 14:24:12 +00: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
3 changed files with 23 additions and 0 deletions
|
@ -715,6 +715,18 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
|
|||
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",
|
||||
fixtureDir: "test-fixtures/classifiers/positive/nginx-1.25.1",
|
||||
|
|
|
@ -283,6 +283,17 @@ var defaultClassifiers = []classifier{
|
|||
PURL: mustPURL("pkg:generic/ruby@version"),
|
||||
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",
|
||||
FileGlob: "**/consul",
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue