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 5, 2024
1 parent 6005b35 commit 4f54e91
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 @@ -59,6 +59,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 4f54e91

Please sign in to comment.