Closed coderpatros closed 3 years ago
The Laravel SBOM example will need to be updated to spec v1.2 once this ticket is complete.
@coderpatros
i am not too famliar wth the 1.2 specs. could you help me find the "dependency graph" element in the XSD and JSON SCHEMA ?
@jkowalleck it’s at the BOM level https://cyclonedx.org/docs/1.2/#type_dependenciesType
The Laravel SBOM example will need to be updated to spec v1.2 once this ticket is complete.
see https://github.com/CycloneDX/sbom-examples/tree/master/laravel-7.12.0 (related: #58 )
based on https://cyclonedx.org/use-cases/#dependency-graph
[DRAFT]
the following might be wrong, need to read SPEC details.... some notes:
A
B
in A
:C
of B
:D
from A that represents C
as a dependency of B
.B
in A
:
write B
's bom-ref
for each C
in B
's dependencies:C
's bom-ref
as a dependency
to B
's dependencies
this might lead to non-reproducible outputs, if bom-ref
change on each runtime...
maybe leverage the packageURL
as a constant value? or generate a constant hash somehow?
attention. keep alias packages in mind and how they should be handled.
implementation aids:
composer why
might have a dep tree implemented
composer show --locked --tree
displays a dep tree - so it must utilize some tree maker somehow.
see if composer's tree makers are public(non-internal) and can me used as a library.
see https://cyclonedx.org/use-cases/#dependency-graph