-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
[Feature Request]: Add support for building BOMs from cargo build
's --build-plan
output
#175
Comments
Thank you for requesting this enhancement. I think the idea is worth investigating. From a brief review, I see that the tracking issue for the Adding my initial thoughts below so they don't get lost when I have time to investigate this in more depth. Feel free to add follow-up thoughts or ask any questions Ideally, with this change,
|
I've been doing something similar to create my own BOMs and license reports, namely use the types in I really like this approach because it is the "ground truth" of what is actually happening in the build. One challenge is sorting through the artifacts that are build-only vs things that actually make it into the compiled binary. Many of these things are just dependencies to compile One thing that's great about this approach is that it respects cargo features. If I build with a subset of features, only the dependencies under that configuration go into the BOM. |
Context:
I am working on the enarx project which supports different feature sets/dependency graphs based on which features and/or binary targets we are compiling for (e.g. for Windows/MacOS/AARCH64 we do not include the
enarx-shim-sgx
andenarx-shim-kvm
binary-dependency subcrates from our workspace). One way to see the differences is on the dependencies used for the various targets/enabled features is to runcargo build -Z unstable-options --build-plan | jq '.inputs'
which outputs a list of paths to theCargo.toml
used for building a binary.Request:
I would recommend a mode for
cargo cyclonedx
which could take parameters that would be used when runningcargo build
(target, features, etc), use that to generate a build-plan, and use the inputs from that buildplan to construct a BOM.Thoughts?
The text was updated successfully, but these errors were encountered: