Skip to content

Initialize SBoM report data structures via caller

Brian Williams requested to merge bwill/refactor-report-initialization into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This is a refactor which causes SBoM report data structures to be initialized by the caller rather than being done as an intermediate step when adding items to the report. The benefits of this are:

  1. This makes the API a bit safer, as hashes being passed into the report methods may not conform to the expected structure, but Component / Source objects are guaranteed to conform to the expected structure.
  2. This makes creating test data easier, as we can use objects created by Component / Source factories in order to populate the components / source in the report object.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Brian Williams

Merge request reports

Loading