Skip to content

Commit

Permalink
fix: only add the package manager category as a name for that package
Browse files Browse the repository at this point in the history
The "security" category is intended to find security information
about this package, but not describing the package itself.

Works around trustification#509
  • Loading branch information
ctron committed Jul 8, 2024
1 parent 10abd1a commit d254bc2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/ingestor/src/graph/sbom/spdx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ impl SbomContext {
let mut refs = Vec::new();

for r in &package.external_reference {
// only add the package manager category, giving this package a name
if r.reference_category != ExternalPackageReferenceCategory::PackageManager {
continue;
}

match &*r.reference_type {
"purl" => {
if let Ok(purl) = Purl::from_str(&r.reference_locator) {
Expand Down

0 comments on commit d254bc2

Please sign in to comment.