mirror of
https://github.com/anchore/syft.git
synced 2026-05-20 12:15:27 +02:00
feat: OpenLDAP binary classifier (#4755)
Signed-off-by: Nadim Zubidat <nadimz@users.noreply.github.com>
This commit is contained in:
parent
ce2c56bf06
commit
bcc1f15ceb
@ -423,6 +423,16 @@ catalogers:
|
||||
cpes:
|
||||
- cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*
|
||||
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
|
||||
criteria:
|
||||
- '**/libQt*Core.so*'
|
||||
|
||||
@ -1342,6 +1342,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
||||
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",
|
||||
expected: pkg.Package{
|
||||
|
||||
@ -516,6 +516,17 @@ func DefaultClassifiers() []binutils.Classifier {
|
||||
PURL: mustPURL("pkg:generic/openssl@version"),
|
||||
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",
|
||||
FileGlob: "**/libQt*Core.so*",
|
||||
|
||||
BIN
syft/pkg/cataloger/binary/testdata/classifiers/snippets/openldap/2.6.10/linux-amd64/ldapsearch
vendored
Normal file
BIN
syft/pkg/cataloger/binary/testdata/classifiers/snippets/openldap/2.6.10/linux-amd64/ldapsearch
vendored
Normal file
Binary file not shown.
@ -823,6 +823,14 @@ from-images:
|
||||
paths:
|
||||
- /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
|
||||
version: 8.9.1
|
||||
images:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user