diff --git a/test/cli/utils_test.go b/test/cli/utils_test.go index 13e9cd9e..ae26eb9d 100644 --- a/test/cli/utils_test.go +++ b/test/cli/utils_test.go @@ -13,9 +13,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/anchore/stereoscope/pkg/imagetest" + "github.com/stretchr/testify/require" ) func getFixtureImage(tb testing.TB, fixtureImageName string) string { diff --git a/xeol/pkg/package.go b/xeol/pkg/package.go index e7ebd1e8..7542c5bb 100644 --- a/xeol/pkg/package.go +++ b/xeol/pkg/package.go @@ -8,7 +8,6 @@ import ( "github.com/anchore/syft/syft/artifact" "github.com/anchore/syft/syft/cpe" "github.com/anchore/syft/syft/file" - "github.com/anchore/syft/syft/linux" "github.com/anchore/syft/syft/pkg" cpes "github.com/anchore/syft/syft/pkg/cataloger/common/cpe" @@ -98,7 +97,7 @@ func (p Package) String() string { return fmt.Sprintf("Pkg(type=%s, name=%s, version=%s, upstreams=%d)", p.Type, p.Name, p.Version, len(p.Upstreams)) } -func removePackagesByOverlap(catalog *pkg.Collection, relationships []artifact.Relationship, distro *linux.Release) *pkg.Collection { +func removePackagesByOverlap(catalog *pkg.Collection, relationships []artifact.Relationship) *pkg.Collection { byOverlap := map[artifact.ID]artifact.Relationship{} for _, r := range relationships { if r.Type == artifact.OwnershipByFileOverlapRelationship { diff --git a/xeol/pkg/package_test.go b/xeol/pkg/package_test.go index d823955d..b782c182 100644 --- a/xeol/pkg/package_test.go +++ b/xeol/pkg/package_test.go @@ -736,7 +736,7 @@ func Test_RemovePackagesByOverlap(t *testing.T) { } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - catalog := removePackagesByOverlap(test.sbom.Artifacts.Packages, test.sbom.Relationships, test.sbom.Artifacts.LinuxDistribution) + catalog := removePackagesByOverlap(test.sbom.Artifacts.Packages, test.sbom.Relationships) pkgs := FromCollection(catalog, SynthesisConfig{}) var pkgNames []string for _, p := range pkgs { diff --git a/xeol/pkg/syft_provider.go b/xeol/pkg/syft_provider.go index f6a1cf6f..5f028b6e 100644 --- a/xeol/pkg/syft_provider.go +++ b/xeol/pkg/syft_provider.go @@ -28,7 +28,7 @@ func syftProvider(userInput string, config ProviderConfig) ([]Package, Context, return nil, Context{}, nil, err } - catalog = removePackagesByOverlap(catalog, relationships, theDistro) + catalog = removePackagesByOverlap(catalog, relationships) srcDescription := src.Describe() diff --git a/xeol/pkg/syft_sbom_provider.go b/xeol/pkg/syft_sbom_provider.go index 9203ddd5..14903183 100644 --- a/xeol/pkg/syft_sbom_provider.go +++ b/xeol/pkg/syft_sbom_provider.go @@ -30,7 +30,7 @@ func syftSBOMProvider(userInput string, config ProviderConfig) ([]Package, Conte return nil, Context{}, nil, err } - catalog := removePackagesByOverlap(s.Artifacts.Packages, s.Relationships, s.Artifacts.LinuxDistribution) + catalog := removePackagesByOverlap(s.Artifacts.Packages, s.Relationships) return FromCollection(catalog, config.SynthesisConfig), Context{ Source: &s.Source,