From d7194bb00fa0b0b7e3d4fd25c18c6585088ab2f7 Mon Sep 17 00:00:00 2001 From: Weston Steimel Date: Wed, 16 Oct 2024 16:43:50 +0000 Subject: [PATCH] fix: improve mariadb binary classifer to detect older versions (#3339) With older versions of mariadb the binary name was `mysql`, so this adjusts the binary classifier to additionally search for the expected version pattern in `mysql` binaries. Signed-off-by: Weston Steimel --- syft/pkg/cataloger/binary/classifiers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syft/pkg/cataloger/binary/classifiers.go b/syft/pkg/cataloger/binary/classifiers.go index eb936a93a..fdd7a6ab3 100644 --- a/syft/pkg/cataloger/binary/classifiers.go +++ b/syft/pkg/cataloger/binary/classifiers.go @@ -351,7 +351,7 @@ func DefaultClassifiers() []Classifier { }, { Class: "mariadb-binary", - FileGlob: "**/mariadb", + FileGlob: "**/{mariadb,mysql}", EvidenceMatcher: FileContentsVersionMatcher( // 10.6.15-MariaDB `(?m)(?P[0-9]+(\.[0-9]+)?(\.[0-9]+)?(alpha[0-9]|beta[0-9]|rc[0-9])?)-MariaDB`),