mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
fix: Improve detection of erlang binary in alpine Linux (#3839)
Signed-off-by: Oleksandr Vodotiiets <alex.vodotiiets@gmail.com> Signed-off-by: Oleksandr Vodotiiets <61548316+avodotiiets@users.noreply.github.com>
This commit is contained in:
parent
09c3b7cbea
commit
78ef2cf53b
@ -1067,6 +1067,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
||||
Metadata: metadata("erlang-alpine-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "erlang/26.1.2/linux-arm64",
|
||||
expected: pkg.Package{
|
||||
Name: "erlang",
|
||||
Version: "26.1.2",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/erlang@26.1.2",
|
||||
Locations: locations("beam.smp"),
|
||||
Metadata: metadata("erlang-alpine-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "swipl/9.3.8/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
|
||||
@ -426,6 +426,10 @@ func DefaultClassifiers() []Classifier {
|
||||
// <artificial>[NUL]/usr/local/src/otp-25.3.2.7/erts/
|
||||
`(?m)/usr/local/src/otp-(?P<version>[0-9]+\.[0-9]+(\.[0-9]+){0,2}(-rc[0-9])?)/erts/`,
|
||||
),
|
||||
FileContentsVersionMatcher(
|
||||
// [NUL][NUL]26.1.2[NUL][NUL][NUL][NUL][NUL][NUL][NUL]NUL[NUL][NUL]Erlang/OTP
|
||||
`\x00+(?P<version>[0-9]+\.[0-9]+(\.[0-9]+){0,2}(-rc[0-9])?)\x00+Erlang/OTP`,
|
||||
),
|
||||
),
|
||||
Package: "erlang",
|
||||
PURL: mustPURL("pkg:generic/erlang@version"),
|
||||
|
||||
Binary file not shown.
@ -71,6 +71,14 @@ from-images:
|
||||
paths:
|
||||
- /usr/local/lib/erlang/erts-15.0/bin/beam.smp
|
||||
|
||||
- name: erlang
|
||||
version: 26.1.2
|
||||
images:
|
||||
- ref: hexpm/elixir:1.15.6-erlang-26.1.2-alpine-3.18.4@sha256:e84f6667f4e3d2fe00fcdb9d1c2cdd614733296c39b20b28b092743f1161bc11
|
||||
platform: linux/arm64
|
||||
paths:
|
||||
- /usr/local/lib/erlang/erts-14.1.1/bin/beam.smp
|
||||
|
||||
- version: 9.3.8
|
||||
images:
|
||||
- ref: swipl:9.3.8@sha256:6a15e6a03afe943228924a5502ba763e653ff28d9b3391e2b3e1fc3e991f37d4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user