Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improved CPE-generation for several more APK packages #1631

Merged
merged 10 commits into from
Mar 1, 2023
60 changes: 60 additions & 0 deletions syft/pkg/cataloger/common/cpe/candidate_by_package_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,66 @@ var defaultCandidateAdditions = buildCandidateLookup(
candidateKey{PkgName: "libxpm"},
candidateAddition{AdditionalVendors: []string{"libxpm_project"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "musl"},
candidateAddition{AdditionalVendors: []string{"musl-libc"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "firefox"},
candidateAddition{AdditionalVendors: []string{"mozilla"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "firefox-esr"},
candidateAddition{AdditionalVendors: []string{"mozilla"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "thunderbird"},
candidateAddition{AdditionalVendors: []string{"mozilla"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "chromium"},
candidateAddition{AdditionalVendors: []string{"google"}, AdditionalProducts: []string{"chrome"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "apache"},
candidateAddition{AdditionalProducts: []string{"http_server"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "tiff"},
candidateAddition{AdditionalProducts: []string{"libtiff"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "ghostscript"},
candidateAddition{AdditionalVendors: []string{"artifex"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "openjpeg"},
candidateAddition{AdditionalVendors: []string{"uclouvain"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "xorg-server"},
candidateAddition{AdditionalVendors: []string{"x.org"}, AdditionalProducts: []string{"x_server"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "podofo"},
candidateAddition{AdditionalVendors: []string{"podofo_project"}},
},
{
pkg.ApkPkg,
candidateKey{PkgName: "wpa_supplicant"},
candidateAddition{AdditionalVendors: []string{"w1.fi"}},
},
//
// Binary packages
{
Expand Down
4 changes: 4 additions & 0 deletions syft/pkg/cataloger/common/cpe/vendors_from_url.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ var (
"https://www.ruby-lang.org/": {"ruby-lang"},
"https://llvm.org/": {"llvm"},
"https://www.isc.org/": {"isc"},
"https://musl.libc.org/": {"musl-libc"},
"https://www.mozilla.org/": {"mozilla"},
"https://www.x.org/": {"x.org"},
"https://w1.fi/": {"w1.fi"},
}

vendorExtractionPatterns = []*regexp.Regexp{
Expand Down