github.com/anchore/syft@v1.4.2-0.20240516191711-1bec1fc5d397/syft/pkg/binary.go (about)

     1  package pkg
     2  
     3  import "github.com/anchore/syft/syft/file"
     4  
     5  // BinarySignature represents a set of matched values within a binary file.
     6  type BinarySignature struct {
     7  	Matches []ClassifierMatch `mapstructure:"Matches" json:"matches"`
     8  }
     9  
    10  // ClassifierMatch represents a single matched value within a binary file and the "class" name the search pattern represents.
    11  type ClassifierMatch struct {
    12  	Classifier string        `mapstructure:"Classifier" json:"classifier"`
    13  	Location   file.Location `mapstructure:"Location" json:"location"`
    14  }
    15  
    16  // ELFBinaryPackageNoteJSONPayload Represents metadata captured from the .note.package section of the binary
    17  type ELFBinaryPackageNoteJSONPayload struct {
    18  	Type       string `json:"type,omitempty"`
    19  	Vendor     string `json:"vendor,omitempty"`
    20  	System     string `json:"system,omitempty"`
    21  	SourceRepo string `json:"sourceRepo,omitempty"`
    22  	Commit     string `json:"commit,omitempty"`
    23  }