How to model native (C++) shared and static libraries dependencies #815
-
|
Hi, I have a native SDK that ships a few C++ projects compiled into shared libraries, some into static libraries, and some build tools. The SDK ships:
I would like to ship a single CycloneDX BOM for this SDK, that would describe these libraries and tools. For a SPDX sbom, both SPDX v2 and v3 have various relationship types like My initial guess is that each of the libraries and tools should be represented by a I've seen #135 but that only mentions documentation references. The spec has a I would appreciate some guidance on what would be the best way to model this using CycloneDX. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
your goal is to describe your shippable product - the SDK - and it is an aggregate of those shared/static libraries? |
Beta Was this translation helpful? Give feedback.
-
|
For static linking, simply use an assembly (nested component). Since statically linked libraries are included/embedded in the thing that depends on them. For dynamically linked libraries, simply use a flat list of components (no nesting), since dynamically linked libraries are standalone files and not embedded. For dependsOn, simply use the CycloneDX dependencies functionality and for build related information, use formulation. You'll find that CycloneDX has a ton of relationships, but it doesn't have a simplistic list like SPDX does. It's also a lot more granular, especially when it comes to formulation, but it can be a bit more of a learning curve - just because it has so much capability. Refer to https://cyclonedx.org/guides/OWASP_CycloneDX-Authoritative-Guide-to-MBOM-en.pdf to get started. |
Beta Was this translation helpful? Give feedback.
For static linking, simply use an assembly (nested component). Since statically linked libraries are included/embedded in the thing that depends on them. For dynamically linked libraries, simply use a flat list of components (no nesting), since dynamically linked libraries are standalone files and not embedded.
For dependsOn, simply use the CycloneDX dependencies functionality and for build related information, use formulation. You'll find that CycloneDX has a ton of relationships, but it doesn't have a simplistic list like SPDX does. It's also a lot more granular, especially when it comes to formulation, but it can be a bit more of a learning curve - just because it has so much capabilit…