feat: OpenLDAP binary classifier (#4755)

Signed-off-by: Nadim Zubidat <nadimz@users.noreply.github.com>
This commit is contained in:
nadimz 2026-04-13 22:27:48 +02:00 committed by GitHub
parent ce2c56bf06
commit bcc1f15ceb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 40 additions and 0 deletions

View File

@ -423,6 +423,16 @@ catalogers:
cpes: cpes:
- cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*
type: BinaryPkg type: BinaryPkg
- method: glob
criteria:
- '**/ldapsearch'
packages:
- class: openldap-search-binary
name: openldap
purl: pkg:generic/openldap
cpes:
- cpe:2.3:a:openldap:openldap:*:*:*:*:*:*:*:*
type: BinaryPkg
- method: glob - method: glob
criteria: criteria:
- '**/libQt*Core.so*' - '**/libQt*Core.so*'

View File

@ -1342,6 +1342,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
Metadata: metadata("openssl-binary"), Metadata: metadata("openssl-binary"),
}, },
}, },
{
logicalFixture: "openldap/2.6.10/linux-amd64",
expected: pkg.Package{
Name: "openldap",
Version: "2.6.10",
Type: "binary",
PURL: "pkg:generic/openldap@2.6.10",
Locations: locations("ldapsearch"),
Metadata: metadata("openldap-search-binary"),
},
},
{ {
logicalFixture: "qt/4.8.6/linux-amd64", logicalFixture: "qt/4.8.6/linux-amd64",
expected: pkg.Package{ expected: pkg.Package{

View File

@ -516,6 +516,17 @@ func DefaultClassifiers() []binutils.Classifier {
PURL: mustPURL("pkg:generic/openssl@version"), PURL: mustPURL("pkg:generic/openssl@version"),
CPEs: singleCPE("cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource), CPEs: singleCPE("cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
}, },
{
Class: "openldap-search-binary",
FileGlob: "**/ldapsearch",
EvidenceMatcher: m.FileContentsVersionMatcher(
// $OpenLDAP: ldapsearch 2.4.45'
`\$OpenLDAP:\sldapsearch\s(?P<version>[0-9]+\.[0-9]+\.[0-9]+)`,
),
Package: "openldap",
PURL: mustPURL("pkg:generic/openldap@version"),
CPEs: singleCPE("cpe:2.3:a:openldap:openldap:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
},
{ {
Class: "qt-qtbase-lib", Class: "qt-qtbase-lib",
FileGlob: "**/libQt*Core.so*", FileGlob: "**/libQt*Core.so*",

View File

@ -823,6 +823,14 @@ from-images:
paths: paths:
- /usr/local/openresty/openssl/bin/openssl - /usr/local/openresty/openssl/bin/openssl
- name: openldap
version: 2.6.10
images:
- ref: bitnamilegacy/openldap:2.6.10-debian-12-r4@sha256:966fd39ed25813890e9bd57dac56def163bbcfe64967e0bae59ab018d505bd93
platform: linux/amd64
paths:
- /opt/bitnami/openldap/bin/ldapsearch
- name: curl - name: curl
version: 8.9.1 version: 8.9.1
images: images: