mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 00:46:38 +01:00
Add ELF binary package cataloger (#2396)
* feat Adds Elf package catalogger Signed-off-by: Brian Ebarb <ebarb.brian@gmail.com> * Add test fixtures for elf package Signed-off-by: Colleen Divers <colleen.divers@gmail.com> * bump JSON schema to v16.0.6 + expand test fixtures Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * less verbose logging Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove dead test code Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove unreleated swift change Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Brian Ebarb <ebarb.brian@gmail.com> Signed-off-by: Colleen Divers <colleen.divers@gmail.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: Colleen Divers <colleen.divers@gmail.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
co-authored by
Colleen Divers
Alex Goodman
parent
7ab6fc3fe4
commit
6a2517b5d2
@@ -0,0 +1,23 @@
|
||||
package pkg
|
||||
|
||||
import "github.com/anchore/syft/syft/file"
|
||||
|
||||
// BinarySignature represents a set of matched values within a binary file.
|
||||
type BinarySignature struct {
|
||||
Matches []ClassifierMatch `mapstructure:"Matches" json:"matches"`
|
||||
}
|
||||
|
||||
// ClassifierMatch represents a single matched value within a binary file and the "class" name the search pattern represents.
|
||||
type ClassifierMatch struct {
|
||||
Classifier string `mapstructure:"Classifier" json:"classifier"`
|
||||
Location file.Location `mapstructure:"Location" json:"location"`
|
||||
}
|
||||
|
||||
// ELFBinaryPackageNoteJSONPayload Represents metadata captured from the .note.package section of the binary
|
||||
type ELFBinaryPackageNoteJSONPayload struct {
|
||||
Type string `json:"type,omitempty"`
|
||||
Vendor string `json:"vendor,omitempty"`
|
||||
System string `json:"system,omitempty"`
|
||||
SourceRepo string `json:"sourceRepo,omitempty"`
|
||||
Commit string `json:"commit,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user