Skip to content

feat: no-scan mode #4110

Open
Open
@terriko

Description

@terriko

Description

Add the ability to generate an SBOM without doing a cve scan of the components found. We could potentially make this work for other formats other than SBOM (such as an HTML report) but I suspect that SBOM will be by far the preferred mode.

Right now, the tool expects you to initialize the database with data from NVD and will always provide whatever scan results it finds. But the binary signatures and our collection of parsers could be used just to give you a list of components without any vulnerability information attached. While we've alleviated some of our problems with NVD reliability using the mirror, it's still a lot of data to download if you're not even going to use it, so it would be nice to have a way for people to turn that off if they don't want it.

I'm not sure off the top of my head exactly how much re-wiring this would take. We may be able to fake something up by initializing an empty database if no database exists, but I don't want it generating a bunch of reports that says "0 cves found" if in fact no data was downloaded. At a guess, we'd need to refactor in a few places:

  • Code to skip every single database call, similar to what we do with --offline for network calls.
  • Generation of reports: will need to take out all the parts of reports that refer to cves and (where appropriate) instead have some boilerplate text saying that cve-bin-tool was run in no-scan mode
  • probably a new flag (e..g --no-scan) to trigger the behaviour
  • I think it would also be nice to have something with a different name than cve-bin-tool so people can call something more obvious like generate-sbom after they've pip installed cve-bin-tool.

Why?

It turns out that some users. particularly in the embedded community, find our ability to generate SBOMs from binaries useful but don't need to use the cve-scanning portion of cve-bin-tool (either because they only want a component list or because they use another tool for this part of things).

This was a bit of a surprise to me. The embedded tools I use most can generate their own (more accurate) SBOMs, and I'd assumed that existing tools used for licensing had already covered the binary analysis gap reasonably well. But it sounds like we have a little niche with our combo of binary signature and sbom export capabilities. Even if it feels a bit at odds with our original goals for this project, I'd really like to support our users better!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions