sbom-tool
sbom-tool copied to clipboard
Dev/stage/prod dependencies
Is there a way to filter out dependencies? In my case I want to include only production dependencies and opt out dev/stage dependencies. Is that a possible option? I believe by default Microsoft SBOM generator will capture all dependencies and generate BOM.
@sachinshaji You are correct, currently we don't have a way to seperate out dev/stage dependencies from production.
@ksigmund , I think you work on a feature to filter our packages from SBOM specifying the exceptions in the command line, right?
What I'd added was a way to specify additional arguments to component detection.
@sachinshaji , would the ability to exclude folders for dependencies detection help you in this case?
Sorry to say that it didn't. Our dev/stage/prod dependencies are present in a single file so the mentioned approach couldn't solve the issue. Thanks for the response
The component detection documentation seems to suggest that test dependencies are at least flagged up at that stage as being development dependencies. Couldn't this be exposed as an argument, to respect this flag and to include or exclude them based on this? At the minute, it appears test dependencies in maven are not treated any differently and are added to the sbom.
Components tagged as a test dependency are marked as development dependencies.
https://github.com/microsoft/component-detection/blob/7537eed5e6becb8eb1dd6662e5ef6d346776b097/docs/detectors/maven.md
@daneshbadlani to follow up to see if there are other component detectors other than maven that flag test or development dependencies
@daneshbadlani to follow up to see if there are other component detectors other than maven that flag test or development dependencies
There appears to be an open ticket against this. I would suggest that it's the component detection projects issue and sbom-tool is aligned to that. Once that issue is resolved, it's just a case of pulling in the new version of their code.
https://github.com/microsoft/component-detection/issues/198
Once component detectors adds this functionality we will prioritize the integration with the sbom tool
Once component detectors adds this functionality we will prioritize the integration with the sbom tool
Would it make sense to comment on the related ticket as such. Whilst it shows a linkage, nobody will necessarily know that this is the case.