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

     1  package options
     2  
     3  import "github.com/anchore/syft/syft/cataloging"
     4  
     5  type packageConfig struct {
     6  	SearchUnindexedArchives         bool `yaml:"search-unindexed-archives" json:"search-unindexed-archives" mapstructure:"search-unindexed-archives"`
     7  	SearchIndexedArchives           bool `yaml:"search-indexed-archives" json:"search-indexed-archives" mapstructure:"search-indexed-archives"`
     8  	ExcludeBinaryOverlapByOwnership bool `yaml:"exclude-binary-overlap-by-ownership" json:"exclude-binary-overlap-by-ownership" mapstructure:"exclude-binary-overlap-by-ownership"` // exclude synthetic binary packages owned by os package files
     9  }
    10  
    11  func defaultPackageConfig() packageConfig {
    12  	c := cataloging.DefaultArchiveSearchConfig()
    13  	return packageConfig{
    14  		SearchIndexedArchives:           c.IncludeIndexedArchives,
    15  		SearchUnindexedArchives:         c.IncludeUnindexedArchives,
    16  		ExcludeBinaryOverlapByOwnership: true,
    17  	}
    18  }