Skip to content
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

cargo/rust: how to avoid sbom contains source files #1629

Open
jkvbe opened this issue Feb 12, 2025 · 3 comments
Open

cargo/rust: how to avoid sbom contains source files #1629

jkvbe opened this issue Feb 12, 2025 · 3 comments

Comments

@jkvbe
Copy link

jkvbe commented Feb 12, 2025

When running cdxgen is run against a cargo/rust project it contains source files of dependencies. I have 2 questions:

  • Why are source files included? Why not limit it to crate level? Source files don't even have a Package URL or other id.
  • I tried different options to exclude or filter out source files by using the suggestions chatgpt offered, but source files keep being included. What's the proper way to exclude source files from the sbom?

Thanks!

@prabhu
Copy link
Collaborator

prabhu commented Feb 12, 2025

It's a good feedback. It was originally added to implement evinse for Rust projects. We stopped it half way after realizing it is more involved and probably best done in blint with llvm frontend. Does the source information affect you, like failed validations etc?

@jkvbe
Copy link
Author

jkvbe commented Feb 15, 2025

It does not cause validation failures, but it does blow-up the sbom considerably. Over 70% of the sbom are source files. We mainly want to use the sbom for vulnerability management. So the source files don't add any value. They just take space in our database.

@prabhu
Copy link
Collaborator

prabhu commented Feb 15, 2025

Understood. Will look into the Rust a bit more. We have #1595 already so a good excuse to do this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants