diff --git a/syft/pkg/cataloger/binary/classifier_cataloger_test.go b/syft/pkg/cataloger/binary/classifier_cataloger_test.go index 88cbb7cb80a..b17d0edfc9d 100644 --- a/syft/pkg/cataloger/binary/classifier_cataloger_test.go +++ b/syft/pkg/cataloger/binary/classifier_cataloger_test.go @@ -1203,6 +1203,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) { Metadata: metadata("openssh-binary"), }, }, + { + logicalFixture: "syslog-ng/4.7.1/linux-amd64", + expected: pkg.Package{ + Name: "syslog-ng", + Version: "4.7.1", + Type: "binary", + PURL: "pkg:generic/syslog-ng@4.7.1", + Locations: locations("syslog-ng"), + Metadata: metadata("syslog-ng-binary"), + }, + }, } for _, test := range tests { diff --git a/syft/pkg/cataloger/binary/classifiers.go b/syft/pkg/cataloger/binary/classifiers.go index 65d87ec11b4..de7ab749935 100644 --- a/syft/pkg/cataloger/binary/classifiers.go +++ b/syft/pkg/cataloger/binary/classifiers.go @@ -664,6 +664,16 @@ func DefaultClassifiers() []Classifier { PURL: mustPURL("pkg:generic/openssh@version"), CPEs: singleCPE("cpe:2.3:a:openbsd:openssh:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource), }, + { + Class: "syslog-ng-binary", + FileGlob: "**/syslog-ng", + EvidenceMatcher: FileContentsVersionMatcher( + `\x00syslog-ng [0-9] \((?P[0-9]+\.[0-9]+\.[0-9]+)\)`, + ), + Package: "syslog-ng", + PURL: mustPURL("pkg:generic/syslog-ng@version"), + CPEs: singleCPE("cpe:2.3:a:oneidentity:syslog-ng:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource), + }, } } diff --git a/syft/pkg/cataloger/binary/test-fixtures/config.yaml b/syft/pkg/cataloger/binary/test-fixtures/config.yaml index 2cf04ddb7c2..06b6b2bfe89 100644 --- a/syft/pkg/cataloger/binary/test-fixtures/config.yaml +++ b/syft/pkg/cataloger/binary/test-fixtures/config.yaml @@ -687,3 +687,11 @@ from-images: platform: linux/amd64 paths: - /usr/bin/ssh + + - name: syslog-ng + version: 4.7.1 + images: + - ref: linuxserver/syslog-ng:4.7.1@sha256:c995ed807bafc61972c486a4a876589df214dc34f4caf2e329bb6ef6bcf12639 + platform: linux/amd64 + paths: + - /usr/sbin/syslog-ng