mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 02:26:42 +01:00
qt bin classifier, fixed #4467
Signed-off-by: Rez Moss <hi@rezmoss.com>
This commit is contained in:
parent
48948ddb8f
commit
873173da10
@ -1216,6 +1216,39 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
|||||||
Metadata: metadata("openssl-binary"),
|
Metadata: metadata("openssl-binary"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
logicalFixture: "qt/4.8.7/linux-amd64",
|
||||||
|
expected: pkg.Package{
|
||||||
|
Name: "qt",
|
||||||
|
Version: "4.8.7",
|
||||||
|
Type: "binary",
|
||||||
|
PURL: "pkg:generic/qt@4.8.7",
|
||||||
|
Locations: locations("libQtCore.so"),
|
||||||
|
Metadata: metadata("qt-binary-lib"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
logicalFixture: "qt/5.15.2/linux-amd64",
|
||||||
|
expected: pkg.Package{
|
||||||
|
Name: "qt",
|
||||||
|
Version: "5.15.2",
|
||||||
|
Type: "binary",
|
||||||
|
PURL: "pkg:generic/qt@5.15.2",
|
||||||
|
Locations: locations("libQt5Core.so"),
|
||||||
|
Metadata: metadata("qt-binary-lib"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
logicalFixture: "qt/6.5.0/linux-amd64",
|
||||||
|
expected: pkg.Package{
|
||||||
|
Name: "qt",
|
||||||
|
Version: "6.5.0",
|
||||||
|
Type: "binary",
|
||||||
|
PURL: "pkg:generic/qt@6.5.0",
|
||||||
|
Locations: locations("libQt6Core.so"),
|
||||||
|
Metadata: metadata("qt-binary-lib"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
logicalFixture: "gcc/12.3.0/linux-amd64",
|
logicalFixture: "gcc/12.3.0/linux-amd64",
|
||||||
expected: pkg.Package{
|
expected: pkg.Package{
|
||||||
|
|||||||
@ -513,6 +513,19 @@ 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: "qt-binary-lib",
|
||||||
|
FileGlob: "**/libQt*Core.so*",
|
||||||
|
EvidenceMatcher: binutils.MatchAny(
|
||||||
|
// Qt 5.x and Qt 6.x pattern [NUL][NUL]Qt 6.5.0 (x86_64-little_endian-...
|
||||||
|
m.FileContentsVersionMatcher(`\x00\x00Qt (?P<version>[0-9]+\.[0-9]+\.[0-9]+) \(`),
|
||||||
|
// Qt 4.x pattern QtCore lib ver 4.8.7
|
||||||
|
m.FileContentsVersionMatcher(`QtCore library version (?P<version>[0-9]+\.[0-9]+\.[0-9]+)`),
|
||||||
|
),
|
||||||
|
Package: "qt",
|
||||||
|
PURL: mustPURL("pkg:generic/qt@version"),
|
||||||
|
CPEs: singleCPE("cpe:2.3:a:qt:qt:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Class: "gcc-binary",
|
Class: "gcc-binary",
|
||||||
FileGlob: "**/gcc",
|
FileGlob: "**/gcc",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user