Skip to content

Commit

Permalink
fix: improvements to known CPE index construction (#2801)
Browse files Browse the repository at this point in the history
* fix: stop pre-filtering potential known CPE URLs

Previously when building the known CPE index, there was logic to
de-duplicate processing based on the normalized CPE name; however, this
means a significant number of known CPE's don't get indexed because the
first instance of that name didn't have a supported collection url but a
later one did.  This isn't code that executes at runtime in syft so
de-duplicating the processing for performance isn't really necessary
here and it doesn't add much to the total runtime anyways

Signed-off-by: Weston Steimel <commits@weston.slmail.me>

* fix: CPE index builder should extract and consider all reference urls

Previously the struct definition for CpeItem caused only the last URL
reference in the list to be kept and processed for inclusion in the
index

Signed-off-by: Weston Steimel <commits@weston.slmail.me>

---------

Signed-off-by: Weston Steimel <commits@weston.slmail.me>
  • Loading branch information
westonsteimel authored Apr 23, 2024
1 parent f7d3d55 commit 891e61a
Show file tree
Hide file tree
Showing 5 changed files with 700 additions and 22 deletions.
Loading

0 comments on commit 891e61a

Please # to comment.