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

Export component list in SBOM format #1697

Closed
terriko opened this issue Jun 9, 2022 · 5 comments
Closed

Export component list in SBOM format #1697

terriko opened this issue Jun 9, 2022 · 5 comments

Comments

@terriko
Copy link
Contributor

terriko commented Jun 9, 2022

Should we make it possible to export a list of components in SBOM format using CVE-bin-tool?

We've had this discussion in the past and decided that was outside the scope of what we're trying to build, but we've grown a lot, have over 100 binary checkers and several package parsing utilities. While I still wouldn't say we can reliably identify every component of interest to someone, I think it's safe to say that we can reliably identify enough to get someone started on building a more comprehensive SBOM. (I'm also not adverse to supplementing what we understand by using other tools if appropriate.)

In particular, I think we might want to generate SBOMs that include {vendor, product} pair information for easier lookup into NVD (and potentially give multiple vendor, product options if they're needed, since we know those aren't always a one-to-one mapping?). This means that you could do with SBOM what we can already do with other formats: do the binary scan once and then re-scan the output regularly without incurring the cost of package finding.

Looking at SPDX specifically, there's also an annotations functionality where we could potentially store things like CVE information, which might also be incredibly useful to folk. It looks like there's also the ability to link to their SBOM entries so if we don't want to shoehorn a whole format into the comments field, we could produce our own JSON that just included links as well.

I suspect @anthonyharrison will be interested, but... is this potentially interesting to anyone else?

@anthonyharrison
Copy link
Contributor

anthonyharrison commented Jun 10, 2022

@terriko This would make a great addition to the capability of the tool. The next evolution of the SPDX SBOM standard is likely to have options to include security information within the SBOM (including CVE references) so this would seem to be well aligned with the idea.

The generation of the SBOM will need to contain additional information in addition to the product/vendor/version information to conform with the standards but these can in most cases be set to default values.

The SBOM would need to contain all of the components and not just those components for which vulnerabilities have been found. This would mean we would need to maintain a list of all components which have been scanned - this would actually be a good enhancement to add an option to report which components have no reported vulnerabilities.

A SBOM needs to have relationships between componants. For a single module/component this is typically its libraries which are required. However one of the big challenges is determining the granulatiry of the SBOM. As it isn't sensible to have a single SBOM for a whole scan (unless it is a single file), we would probably generate multiple SBOMs during a scan (e.g. a single SBOM for each archive).

Obviously cve-bin-tool only identifies and reports the components it has checkers for etc. We might need to consider if there are components which can be identified which don't have a checker (there is some information which could be gleaned from ELF file headers which might help)

I will start sketching out some ideas - we probably need a package to hold and manage a SBOM data model as well as an enhancement to the output engine to generate an SBOM in one or more formats. There probably also needs to be some consideration given to see if there are other tools which could be loosely integrated with cve-bin-tool.

@terriko terriko changed the title Discussion: supporting SBOM formats for export? Export component list in SBOM format Jun 16, 2022
@terriko
Copy link
Contributor Author

terriko commented Jun 16, 2022

I closed #475 in favour of this issue. If anyone spots any other duplicate open issues where we discussed this idea (it's come up a few times!) feel free to let me know so I can clean them up too.

@terriko
Copy link
Contributor Author

terriko commented Jun 16, 2022

Also, I hear rumours that SPDX is considering adding CVE information explicitly into the next version of the spec. I haven't gone to verify, but that would be handy for us, and we might want to go look at and contribute to discussions there before it's finalized.

@terriko
Copy link
Contributor Author

terriko commented Jun 16, 2022

Relevant link to the spec github: https://github.com/spdx/spdx-spec

@anthonyharrison
Copy link
Contributor

anthonyharrison commented Jun 16, 2022 via email

anthonyharrison added a commit to anthonyharrison/cve-bin-tool that referenced this issue Mar 13, 2023
anthonyharrison added a commit to anthonyharrison/cve-bin-tool that referenced this issue Mar 13, 2023
anthonyharrison added a commit to anthonyharrison/cve-bin-tool that referenced this issue Mar 28, 2023
anthonyharrison added a commit to anthonyharrison/cve-bin-tool that referenced this issue Mar 28, 2023
@terriko terriko closed this as completed in 71e528b Apr 4, 2023
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