mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
feat: detect fluent-bit binaries (#2905)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
parent
2b70ea3fc2
commit
ac34808b9c
5 changed files with 49 additions and 0 deletions
|
@ -952,6 +952,28 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
|||
Metadata: metadata("gcc-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "fluent-bit/3.0.2/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "fluent-bit",
|
||||
Version: "3.0.2",
|
||||
Type: "binary",
|
||||
PURL: "pkg:github/fluent/fluent-bit@3.0.2",
|
||||
Locations: locations("fluent-bit"),
|
||||
Metadata: metadata("fluent-bit-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "fluent-bit/2.2.1/linux-arm64",
|
||||
expected: pkg.Package{
|
||||
Name: "fluent-bit",
|
||||
Version: "2.2.1",
|
||||
Type: "binary",
|
||||
PURL: "pkg:github/fluent/fluent-bit@2.2.1",
|
||||
Locations: locations("fluent-bit"),
|
||||
Metadata: metadata("fluent-bit-binary"),
|
||||
},
|
||||
},
|
||||
{
|
||||
logicalFixture: "wp/2.9.0/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
|
|
|
@ -464,6 +464,19 @@ func DefaultClassifiers() []Classifier {
|
|||
PURL: mustPURL("pkg:generic/gcc@version"),
|
||||
CPEs: singleCPE("cpe:2.3:a:gnu:gcc:*:*:*:*:*:*:*:*"),
|
||||
},
|
||||
{
|
||||
Class: "fluent-bit-binary",
|
||||
FileGlob: "**/fluent-bit",
|
||||
EvidenceMatcher: FileContentsVersionMatcher(
|
||||
// [NUL]3.0.2[NUL]%sFluent Bit
|
||||
// [NUL]2.2.3[NUL]Fluent Bit
|
||||
// [NUL]2.2.1[NUL][NUL][NUL]Fluent Bit
|
||||
`\x00(?P<version>[0-9]+\.[0-9]+\.[0-9]+)\x00[^\d]*Fluent`,
|
||||
),
|
||||
Package: "fluent-bit",
|
||||
PURL: mustPURL("pkg:github/fluent/fluent-bit@version"),
|
||||
CPEs: singleCPE("cpe:2.3:a:treasuredata:fluent_bit:*:*:*:*:*:*:*:*"),
|
||||
},
|
||||
{
|
||||
Class: "wordpress-cli-binary",
|
||||
FileGlob: "**/wp",
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -513,6 +513,20 @@ from-images:
|
|||
paths:
|
||||
- /bin/consul
|
||||
|
||||
- version: 3.0.2
|
||||
images:
|
||||
- ref: fluent/fluent-bit:3.0.2-amd64@sha256:7e6fe8efd51dda0739e355f58bf5e3b1623cbf2d4a23c06c7a365d9553e2d242
|
||||
platform: linux/amd64
|
||||
paths:
|
||||
- /fluent-bit/bin/fluent-bit
|
||||
|
||||
- version: 2.2.1
|
||||
images:
|
||||
- ref: fluent/fluent-bit:2.2.1-arm64@sha256:28eb03950eb0dac0ca6faead7fdd7261291d669a2b2f010113dab2c25b52b6bf
|
||||
platform: linux/arm64
|
||||
paths:
|
||||
- /fluent-bit/bin/fluent-bit
|
||||
|
||||
- name: openssl
|
||||
version: 1.1.1w
|
||||
images:
|
||||
|
|
Loading…
Reference in a new issue