-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Only fetching first level of dependencies #1155
Comments
To tailor a solution that fits more than one person/organization, could you help me understand the needs, boundaries and scope? Question: why only a depth of You might be aware that a CycloneDX document that does not include transitive dependencies and nothing that is actually present in an environment, that such a document is not considered an SBOM by most definitions. |
For OSS clearing reasons, we have to upload our used packages to a platform where the clearing team can then start their processes to check, for example, if licenses are fulfilled. For reasons I am not aware of, it is only necessary to upload the first level, not the transitive dependencies. We are trying to automate this process via the API of the platform and the interface is demanding the SBOM format. Currently, from my point of view, there is no need to set the depth individually. However, this would increase flexibility. But also, as you stated, without the transitive dependencies, the resulting document is not an SBOM by definition. That was the reason I suggested the two "extremes" for generating the document: either complete or just the first level. I hope this was a useful explanation of the topic. |
Thank you for clarification. I understand your position. The SBOM that is produced by this tool includes a dependency graph that is rooted on the primary component. The current structures generated by this tool should enable your clearing team to do the needed processing - it probably saves them work, though they did not disclose this to you. :-) |
Ok i will try it like you suggested. |
I will leave this feature request open, so we could track/discuss the general demand and requirements, continue discussions of possible implementations and implications. |
Is your feature request related to a problem? Please describe.
As stated in the docs and the source code this project always fetches all npm packages via the "npm ls" command. Therefore it is executed with "npm ls -all" (i left out the other parametes here for better understanding)
What i would like to have is an option to create the SBOM only with the packages listed in package.json file. Basically just the first level of dependencies.
Describe the solution you'd like
Add an additional parameter e.g. "--only-first-level-dependencies" to call "npm ls" without the --depth parameter or set to 1 to fetch only the first level of dependencies/packages.
Default of the parameter can be false so it will by default fetch all dependencies and only if you are configuring it you can limit the fetching.
Describe alternatives you've considered
none. i think this the nicest approach
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: