Open duranjesus opened 2 months ago
👋 thanks for the issue @duranjesus I reproduced this and agree that both the syft.json
and spdx
formats output should be more expressive. Currently we illustrate one direction on the graph with the CONTAINS
relationship tiny-package---> *
. We do not go the extra distance and do the opposite edge of DEPENDENCY_OF
where * --> tiny-package
I've put this in our work for someone to pickup to enhance both documents. Until then I hope the CONTAINS
can get you partially there when trying to describe how these packages are linked.
We talked about this on our live stream - https://www.youtube.com/watch?v=m0wG_LQUhPo
Short Version: For this cataloger we're going to move away from contains and add in the bidirectional graph of adding these relationships in teh way @duranjesus describes:
DEPENDS_ON | Is to be used when SPDXRef-A depends on SPDXRef-B. | Package A depends on the presence of package B in order to build and run
-- | -- | --
DEPENDENCY_OF | Is to be used when SPDXRef-A is dependency of SPDXRef-B.
cc @wagoodman if this is a breaking change and if we should keep the contains relationship and just tack on the newer dependencies when cataloging node packages
What happened: Generating an SBOM in SPDX format for a filesystem containing a Node.js (npm) project, the dependency relationships between direct dependencies and transient dependencies are non-existent. In other words, the
DEPENDENCY_OF
classification is not present in the relationships portion of the SBOM.What is being generated by Syft:
What you expected to happen:
Steps to reproduce the issue:
mdkir tiny-package && cd tiny-package
npm init -y
npm install express
syft . --source-name=tiny-package -o spdx-json=syft.sbom.json
Anything else we need to know?:
Environment:
syft version
:cat /etc/os-release
or similar):