mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 23:16:30 +01:00
fix: improve fluent-bit binary detection regex pattern (#3701)
* fix: improve fluent-bit binary detection regex pattern This fixes issue #3133 by updating the regex pattern for fluent-bit binary detection to better handle ANSI escape sequences and multiple null bytes between the version string and "Fluent Bit" text. The change also makes the %s format specifier optional, supporting all variations in fluent-bit binary signatures. Signed-off-by: Alan Pope <alan.pope@anchore.com> * test: add fluent-bit 1.7.0-dev-3 test fixture for issue #3133 Signed-off-by: Alan Pope <alan.pope@anchore.com> --------- Signed-off-by: Alan Pope <alan.pope@anchore.com>
This commit is contained in:
@@ -1221,6 +1221,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
||||
Metadata: metadata("fluent-bit-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "fluent-bit/1.7.0-dev-3/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "fluent-bit",
|
||||
Version: "1.7.0",
|
||||
Type: "binary",
|
||||
PURL: "pkg:github/fluent/fluent-bit@1.7.0",
|
||||
Locations: locations("fluent-bit"),
|
||||
Metadata: metadata("fluent-bit-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "wp/2.9.0/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
|
||||
Reference in New Issue
Block a user