When using cargo-cyclonedx as a library dependency, we're finding that we can't control the location where SBOM files are written. Currently, write_to_files() always writes relative to the manifest path.
Our use case is integrating cargo-cyclonedx where we need to:
- Write SBOMs to specific directories. (like
build/sbom/)
- Control output locations programmatically
It would be helpful if there was a way to specify the output directory, either through:
- Additional configuration in SbomConfig
- Exposing the
write_to_file method as a public API could provide the flexibility we need. It would allow us to specify exact file paths for SBOM output, giving us full control over where files are written.
Note: This is related to #775 but focuses on library usage rather than CLI functionality.
When using cargo-cyclonedx as a library dependency, we're finding that we can't control the location where SBOM files are written. Currently,
write_to_files()always writes relative to the manifest path.Our use case is integrating cargo-cyclonedx where we need to:
build/sbom/)It would be helpful if there was a way to specify the output directory, either through:
write_to_filemethod as a public API could provide the flexibility we need. It would allow us to specify exact file paths for SBOM output, giving us full control over where files are written.Note: This is related to #775 but focuses on library usage rather than CLI functionality.