github.com/noqcks/syft@v0.0.0-20230920222752-a9e2c4e288e5/syft/pkg/gem_metadata.go (about) 1 package pkg 2 3 // GemMetadata represents all metadata parsed from the gemspec file 4 type GemMetadata struct { 5 Name string `mapstructure:"name" json:"name"` 6 Version string `mapstructure:"version" json:"version"` 7 // note regarding if Files can contribute to GemMetadata being able to implement FileOwner: this list is a 8 // "logical" list of files, not a list of paths that can be used to find the files without additional processing. 9 // 10 // For example: The "bundler" gem has a file entry of: 11 // "lib/bundler/vendor/uri/lib/uri/ldap.rb" 12 // but the actual file is located at: 13 // "/usr/local/lib/ruby/3.2.0/bundler/vendor/uri/lib/uri/ldap.rb" 14 // which do not match (the "lib" prefix is missing even for relative processing). 15 // 16 // without additional information about: 17 // - the gem installation path 18 // - the ruby installation path 19 // - the ruby version 20 // - environment variables (e.g. GEM_HOME) that may affect the gem installation path 21 // ... we can't reliably determine the full path to the file on disk, thus cannot implement FileOwner (...yet...). 22 Files []string `mapstructure:"files" json:"files,omitempty"` 23 Authors []string `mapstructure:"authors" json:"authors,omitempty"` 24 Homepage string `mapstructure:"homepage" json:"homepage,omitempty"` 25 }