mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
fix: mysql 8.0.3x binary detection (#3142)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
parent
f786233e97
commit
73b9d5aa42
@ -116,6 +116,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
||||
Metadata: metadata("mysql-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "mysql/8.0.37/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "mysql",
|
||||
Version: "8.0.37",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/mysql@8.0.37",
|
||||
Locations: locations("mysql"),
|
||||
Metadata: metadata("mysql-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "percona-server/8.0.35/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
|
||||
@ -294,8 +294,12 @@ func DefaultClassifiers() []Classifier {
|
||||
{
|
||||
Class: "mysql-binary",
|
||||
FileGlob: "**/mysql",
|
||||
EvidenceMatcher: FileContentsVersionMatcher(
|
||||
`(?m).*/mysql-(?P<version>[0-9]+(\.[0-9]+)?(\.[0-9]+)?(alpha[0-9]|beta[0-9]|rc[0-9])?)`),
|
||||
EvidenceMatcher: evidenceMatchers(
|
||||
// shutdown[NUL]8.0.37[NUL][NUL][NUL][NUL][NUL]mysql_real_esc
|
||||
FileContentsVersionMatcher(`\x00(?P<version>[0-9]+(\.[0-9]+)?(\.[0-9]+)?(alpha[0-9]|beta[0-9]|rc[0-9])?)\x00+mysql`),
|
||||
// /export/home/pb2/build/sb_0-26781090-1516292385.58/release/mysql-8.0.4-rc/mysys_ssl/my_default.cc
|
||||
FileContentsVersionMatcher(`(?m).*/mysql-(?P<version>[0-9]+(\.[0-9]+)?(\.[0-9]+)?(alpha[0-9]|beta[0-9]|rc[0-9])?)`),
|
||||
),
|
||||
Package: "mysql",
|
||||
PURL: mustPURL("pkg:generic/mysql@version"),
|
||||
CPEs: singleCPE("cpe:2.3:a:oracle:mysql:*:*:*:*:*:*:*:*"),
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -157,6 +157,13 @@ from-images:
|
||||
paths:
|
||||
- /usr/bin/mysql
|
||||
|
||||
- version: 8.0.37
|
||||
images:
|
||||
- ref: mysql:8.0.37-bookworm@sha256:bad55a5bb69d6710927792384b5eb55669ee15dc85dca1888874e4a7993eecd8
|
||||
platform: linux/amd64
|
||||
paths:
|
||||
- /usr/bin/mysql
|
||||
|
||||
- name: percona-server
|
||||
version: 8.0.35
|
||||
images:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user