Skip to content

Commit

Permalink
fix: don't clear qualifiers when ingesting CSAF
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Oct 4, 2024
1 parent daef8de commit 506e81b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions modules/fundamental/tests/advisory/csaf/reingest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,10 @@ async fn change_ps_list_vulns(ctx: &TrustifyContext) -> anyhow::Result<()> {
);
assert_eq!(purl.version.version, "1.76.0-4.redhat_00001.1.el9eap");

// FIXME(#879): I'd expect the qualifiers to be present, but they aren't.
/*
assert_eq!(
purl.qualifiers.clone().into_iter().collect::<Vec<_>>(),
vec![("arch".to_string(), "noarch".to_string())]
);
*/

// get vuln by purl

Expand Down Expand Up @@ -204,13 +201,10 @@ async fn change_ps_list_vulns_all(ctx: &TrustifyContext) -> anyhow::Result<()> {
);
assert_eq!(purl.version.version, "1.76.0-4.redhat_00001.1.el9eap");

// FIXME(#879): I'd expect the qualifiers to be present, but they aren't.
/*
assert_eq!(
purl.qualifiers.clone().into_iter().collect::<Vec<_>>(),
vec![("arch".to_string(), "noarch".to_string())]
);
*/

// get vuln by purl

Expand Down
3 changes: 1 addition & 2 deletions modules/ingestor/src/service/advisory/csaf/creator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ impl<'a> StatusCreator<'a> {
}

for purl in &product.packages {
let mut purl = purl.clone();
purl.qualifiers.clear();
let purl = purl.clone();

// Ingest purl status
let info = match purl.version.clone() {
Expand Down

0 comments on commit 506e81b

Please sign in to comment.