mirror of
https://github.com/anchore/syft.git
synced 2026-10-12 06:07:20 +02:00
fix(binary): gzip classifier & GNU gzip identity string (#5202)
--------- Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
This commit is contained in:
@@ -899,6 +899,11 @@ func DefaultClassifiers() []binutils.Classifier {
|
|||||||
Class: "gzip-binary",
|
Class: "gzip-binary",
|
||||||
FileGlob: "**/gzip",
|
FileGlob: "**/gzip",
|
||||||
EvidenceMatcher: m.FileContentsVersionMatcher(
|
EvidenceMatcher: m.FileContentsVersionMatcher(
|
||||||
|
// GNU gzip keeps the version as a bare NUL-delimited token, so require an identifying
|
||||||
|
// string from the program as well. Without it any binary that happens to be named gzip
|
||||||
|
// (such as the busybox multicall binary behind a gzip applet symlink) would have an
|
||||||
|
// arbitrary NUL-delimited "N.N" token reported as a GNU gzip version.
|
||||||
|
`%s: %s: not in gzip format`,
|
||||||
`\x00(?P<version>[0-9]+\.[0-9]+)\x00`,
|
`\x00(?P<version>[0-9]+\.[0-9]+)\x00`,
|
||||||
),
|
),
|
||||||
Package: "gzip",
|
Package: "gzip",
|
||||||
|
|||||||
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user