mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 23:16:30 +01:00
Add RPM file scanning support (#1188)
This commit is contained in:
@@ -80,7 +80,7 @@ func Test_Originator(t *testing.T) {
|
||||
{
|
||||
name: "from rpm",
|
||||
input: pkg.Package{
|
||||
Metadata: pkg.RpmdbMetadata{
|
||||
Metadata: pkg.RpmMetadata{
|
||||
Vendor: "auth",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@ func Originator(p pkg.Package) string {
|
||||
if len(metadata.Authors) > 0 {
|
||||
author = metadata.Authors[0]
|
||||
}
|
||||
case pkg.RpmdbMetadata:
|
||||
case pkg.RpmMetadata:
|
||||
return "Organization: " + metadata.Vendor
|
||||
case pkg.DpkgMetadata:
|
||||
author = metadata.Maintainer
|
||||
|
||||
@@ -326,7 +326,7 @@ func extractMetadata(p *spdx.Package2_2, info pkgInfo) (pkg.MetadataType, interf
|
||||
if license == "" {
|
||||
license = p.PackageLicenseConcluded
|
||||
}
|
||||
return pkg.RpmdbMetadataType, pkg.RpmdbMetadata{
|
||||
return pkg.RpmMetadataType, pkg.RpmMetadata{
|
||||
Name: p.PackageName,
|
||||
Version: p.PackageVersion,
|
||||
Epoch: epoch,
|
||||
|
||||
@@ -176,8 +176,8 @@ func Test_extractMetadata(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
metaType: pkg.RpmdbMetadataType,
|
||||
meta: pkg.RpmdbMetadata{
|
||||
metaType: pkg.RpmMetadataType,
|
||||
meta: pkg.RpmMetadata{
|
||||
Name: "SomeRpmPkg",
|
||||
Version: "13.2.79",
|
||||
Epoch: &oneTwoThreeFour,
|
||||
|
||||
Reference in New Issue
Block a user