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
af3503f3b5
commit
93ede85c9a
@ -437,11 +437,11 @@ catalogers:
|
|||||||
criteria:
|
criteria:
|
||||||
- '**/libQt*Core.so*'
|
- '**/libQt*Core.so*'
|
||||||
packages:
|
packages:
|
||||||
- class: qt-binary-lib
|
- class: qt-qtbase-lib
|
||||||
name: qt
|
name: qtbase
|
||||||
purl: pkg:generic/qt
|
purl: pkg:generic/qtbase
|
||||||
cpes:
|
cpes:
|
||||||
- cpe:2.3:a:qt:qt:*:*:*:*:*:*:*:*
|
- cpe:2.3:a:qt:qtbase:*:*:*:*:*:*:*:*
|
||||||
type: BinaryPkg
|
type: BinaryPkg
|
||||||
- method: glob
|
- method: glob
|
||||||
criteria:
|
criteria:
|
||||||
|
|||||||
@ -1219,34 +1219,34 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
|||||||
{
|
{
|
||||||
logicalFixture: "qt/4.8.7/linux-amd64",
|
logicalFixture: "qt/4.8.7/linux-amd64",
|
||||||
expected: pkg.Package{
|
expected: pkg.Package{
|
||||||
Name: "qt",
|
Name: "qtbase",
|
||||||
Version: "4.8.7",
|
Version: "4.8.7",
|
||||||
Type: "binary",
|
Type: "binary",
|
||||||
PURL: "pkg:generic/qt@4.8.7",
|
PURL: "pkg:generic/qtbase@4.8.7",
|
||||||
Locations: locations("libQtCore.so"),
|
Locations: locations("libQtCore.so"),
|
||||||
Metadata: metadata("qt-binary-lib"),
|
Metadata: metadata("qt-qtbase-lib"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
logicalFixture: "qt/5.15.2/linux-amd64",
|
logicalFixture: "qt/5.15.2/linux-amd64",
|
||||||
expected: pkg.Package{
|
expected: pkg.Package{
|
||||||
Name: "qt",
|
Name: "qtbase",
|
||||||
Version: "5.15.2",
|
Version: "5.15.2",
|
||||||
Type: "binary",
|
Type: "binary",
|
||||||
PURL: "pkg:generic/qt@5.15.2",
|
PURL: "pkg:generic/qtbase@5.15.2",
|
||||||
Locations: locations("libQt5Core.so"),
|
Locations: locations("libQt5Core.so"),
|
||||||
Metadata: metadata("qt-binary-lib"),
|
Metadata: metadata("qt-qtbase-lib"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
logicalFixture: "qt/6.5.0/linux-amd64",
|
logicalFixture: "qt/6.5.0/linux-amd64",
|
||||||
expected: pkg.Package{
|
expected: pkg.Package{
|
||||||
Name: "qt",
|
Name: "qtbase",
|
||||||
Version: "6.5.0",
|
Version: "6.5.0",
|
||||||
Type: "binary",
|
Type: "binary",
|
||||||
PURL: "pkg:generic/qt@6.5.0",
|
PURL: "pkg:generic/qtbase@6.5.0",
|
||||||
Locations: locations("libQt6Core.so"),
|
Locations: locations("libQt6Core.so"),
|
||||||
Metadata: metadata("qt-binary-lib"),
|
Metadata: metadata("qt-qtbase-lib"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -514,7 +514,7 @@ func DefaultClassifiers() []binutils.Classifier {
|
|||||||
CPEs: singleCPE("cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
CPEs: singleCPE("cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Class: "qt-binary-lib",
|
Class: "qt-qtbase-lib",
|
||||||
FileGlob: "**/libQt*Core.so*",
|
FileGlob: "**/libQt*Core.so*",
|
||||||
EvidenceMatcher: binutils.MatchAny(
|
EvidenceMatcher: binutils.MatchAny(
|
||||||
// Qt 5.x and Qt 6.x pattern [NUL][NUL]Qt 6.5.0 (x86_64-little_endian-...
|
// Qt 5.x and Qt 6.x pattern [NUL][NUL]Qt 6.5.0 (x86_64-little_endian-...
|
||||||
@ -522,9 +522,9 @@ func DefaultClassifiers() []binutils.Classifier {
|
|||||||
// Qt 4.x pattern QtCore lib ver 4.8.7
|
// Qt 4.x pattern QtCore lib ver 4.8.7
|
||||||
m.FileContentsVersionMatcher(`QtCore library version (?P<version>[0-9]+\.[0-9]+\.[0-9]+)`),
|
m.FileContentsVersionMatcher(`QtCore library version (?P<version>[0-9]+\.[0-9]+\.[0-9]+)`),
|
||||||
),
|
),
|
||||||
Package: "qt",
|
Package: "qtbase",
|
||||||
PURL: mustPURL("pkg:generic/qt@version"),
|
PURL: mustPURL("pkg:generic/qtbase@version"),
|
||||||
CPEs: singleCPE("cpe:2.3:a:qt:qt:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
CPEs: singleCPE("cpe:2.3:a:qt:qtbase:*:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Class: "gcc-binary",
|
Class: "gcc-binary",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user