diff --git a/syft/pkg/cataloger/binary/classifier_cataloger_test.go b/syft/pkg/cataloger/binary/classifier_cataloger_test.go index a45bcbb0b..4138d7e76 100644 --- a/syft/pkg/cataloger/binary/classifier_cataloger_test.go +++ b/syft/pkg/cataloger/binary/classifier_cataloger_test.go @@ -2629,6 +2629,39 @@ func Test_Cataloger_PositiveCases(t *testing.T) { Metadata: metadata("grafana-binary"), }, }, + { + logicalFixture: "envoy/1.40.1/linux-amd64", + expected: pkg.Package{ + Name: "envoy", + Version: "1.40.1", + Type: "binary", + PURL: "pkg:generic/envoy@1.40.1", + Locations: locations("envoy"), + Metadata: metadata("envoy-binary"), + }, + }, + { + logicalFixture: "envoy/1.40.0/linux-amd64", + expected: pkg.Package{ + Name: "envoy", + Version: "1.40.0", + Type: "binary", + PURL: "pkg:generic/envoy@1.40.0", + Locations: locations("envoy"), + Metadata: metadata("envoy-binary"), + }, + }, + { + logicalFixture: "envoy/1.37.1/linux-amd64", + expected: pkg.Package{ + Name: "envoy", + Version: "1.37.1", + Type: "binary", + PURL: "pkg:generic/envoy@1.37.1", + Locations: locations("envoy"), + Metadata: metadata("envoy-binary"), + }, + }, { logicalFixture: "envoy/1.36.4/linux-amd64", expected: pkg.Package{ diff --git a/syft/pkg/cataloger/binary/classifiers.go b/syft/pkg/cataloger/binary/classifiers.go index 2f9037a94..df648d653 100644 --- a/syft/pkg/cataloger/binary/classifiers.go +++ b/syft/pkg/cataloger/binary/classifiers.go @@ -1135,9 +1135,12 @@ func DefaultClassifiers() []binutils.Classifier { FileGlob: "**/envoy", EvidenceMatcher: binutils.MatchAny( // 1.3x [NUL]1.36.4[NUL]...envoy_reloadable_features + // 1.4x [NUL]1.40.1[NUL]...envoy_reloadable_features // 1.34.5 [NUL]1.34.5[NUL]...envoy.reloadable_features - m.FileContentsVersionMatcher(`(?s)\x00(?P1\.3[0-9]\.[0-9]+(-dev)?)\x00.{0,1000}envoy_reloadable_features`), + m.FileContentsVersionMatcher(`(?s)\x00(?P1\.[34][0-9]\.[0-9]+(-dev)?)\x00.{0,1000}envoy_reloadable_features`), m.FileContentsVersionMatcher(`(?s)\x00(?P1\.34\.5)\x00.{0,200}envoy\.reloadable_features`), + // 1.37.1 DeltaDiscoveryResponse.removed_resources[NUL]1.37.1[NUL]the default now- + m.FileContentsVersionMatcher(`(?s)DeltaDiscoveryResponse\.removed_resources\x00(?P1\.[34][0-9]\.[0-9]+(-dev)?)\x00`), // 1.2x envoy_quic_...[NUL]1.28.7[NUL] m.FileContentsVersionMatcher(`(?s)envoy_quic_.{0,1000}\x00(?P1\.2[0-9]\.[0-9]+(-dev)?)\x00`), // 1.2x [NUL]1.20.7[NUL]Unable to diff --git a/syft/pkg/cataloger/binary/testdata/classifiers/snippets/envoy/1.37.1/linux-amd64/envoy b/syft/pkg/cataloger/binary/testdata/classifiers/snippets/envoy/1.37.1/linux-amd64/envoy new file mode 100644 index 000000000..125d90ea8 Binary files /dev/null and b/syft/pkg/cataloger/binary/testdata/classifiers/snippets/envoy/1.37.1/linux-amd64/envoy differ diff --git a/syft/pkg/cataloger/binary/testdata/classifiers/snippets/envoy/1.40.0/linux-amd64/envoy b/syft/pkg/cataloger/binary/testdata/classifiers/snippets/envoy/1.40.0/linux-amd64/envoy new file mode 100644 index 000000000..aab0400b3 Binary files /dev/null and b/syft/pkg/cataloger/binary/testdata/classifiers/snippets/envoy/1.40.0/linux-amd64/envoy differ diff --git a/syft/pkg/cataloger/binary/testdata/classifiers/snippets/envoy/1.40.1/linux-amd64/envoy b/syft/pkg/cataloger/binary/testdata/classifiers/snippets/envoy/1.40.1/linux-amd64/envoy new file mode 100644 index 000000000..0fe63fd40 Binary files /dev/null and b/syft/pkg/cataloger/binary/testdata/classifiers/snippets/envoy/1.40.1/linux-amd64/envoy differ diff --git a/syft/pkg/cataloger/binary/testdata/config.yaml b/syft/pkg/cataloger/binary/testdata/config.yaml index 9b7657fb7..496a864da 100644 --- a/syft/pkg/cataloger/binary/testdata/config.yaml +++ b/syft/pkg/cataloger/binary/testdata/config.yaml @@ -1579,6 +1579,27 @@ from-images: paths: - /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0 + - version: 1.40.1 + images: + - ref: envoyproxy/envoy:v1.40.1@sha256:713bb146f1a7c97ebc70e13d259f77ff36f2c5d00f3145677816af5af9bd1530 + platform: linux/amd64 + paths: + - /usr/local/bin/envoy + + - version: 1.40.0 + images: + - ref: envoyproxy/envoy:v1.40.0@sha256:459f2a6404c340fe6afccd69d85527012d47f3c036765493e6f8f3113fa384de + platform: linux/amd64 + paths: + - /usr/local/bin/envoy + + - version: 1.37.1 + images: + - ref: envoyproxy/envoy:v1.37.1@sha256:29496a88fba9c4c9cdef4afe8fec70f536c5ba111b1c2bddbc5436b091ceca33 + platform: linux/amd64 + paths: + - /usr/local/bin/envoy + - version: 1.36.4 images: - ref: envoyproxy/envoy:v1.36.4@sha256:ae31562b8cede20913a2d3d6a4f44c8479a50551e033cb8ef7bb8e38cec4b573