Initialize SBoM report data structures via caller
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:
- 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.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Brian Williams