931: binary cataloger exclusion defaults for ownership by overlap (#1948)

Fixes #931

PR #1948 introduces a new implicit exclusion for binary packages that overlap by file ownership and have certain characteristics:

1) the relationship between packages is OwnershipByFileOverlap
2) the parent package is an "os" package - see changelog for included catalogers
3) the child is a synthetic package generated by the binary cataloger - see changelog for included catalogers
4) the package names are identical

---------

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
Christopher Angelo Phillips
2023-08-08 13:00:52 -04:00
committed by GitHub
parent 2fc65094b7
commit 466da7cbda
23 changed files with 295 additions and 109 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import (
"github.com/anchore/syft/syft/pkg"
)
const catalogerName = "binary-cataloger"
const CatalogerName = "binary-cataloger"
func NewCataloger() *Cataloger {
return &Cataloger{}
@@ -22,7 +22,7 @@ type Cataloger struct{}
// Name returns a string that uniquely describes the Cataloger
func (c Cataloger) Name() string {
return catalogerName
return CatalogerName
}
// Catalog is given an object to resolve file references and content, this function returns any discovered Packages
+1 -1
View File
@@ -31,7 +31,7 @@ func newPackage(classifier classifier, location file.Location, matchMetadata map
),
Type: pkg.BinaryPkg,
CPEs: cpes,
FoundBy: catalogerName,
FoundBy: CatalogerName,
MetadataType: pkg.BinaryMetadataType,
Metadata: pkg.BinaryMetadata{
Matches: []pkg.ClassifierMatch{