mirror of
https://github.com/anchore/syft.git
synced 2026-05-20 04:05:24 +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:
|
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*'
|
||||||
|
|||||||
@ -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{
|
||||||
|
|||||||
@ -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*",
|
||||||
|
|||||||
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:
|
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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user