Skip to content

feat: heuristic splitting on - for lookups if vendor/product not found #2956

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

Closed
terriko opened this issue Apr 27, 2023 · 1 comment · Fixed by #3839
Closed

feat: heuristic splitting on - for lookups if vendor/product not found #2956

terriko opened this issue Apr 27, 2023 · 1 comment · Fixed by #3839
Assignees
Labels
enhancement New feature or request

Comments

@terriko
Copy link
Contributor

terriko commented Apr 27, 2023

We recently had a case (see link above) where someone scanning their own SBOM with cve-bin-tool didn't get the scan results they were hoping for because their tool used a name that was basically vendor-product and we treat SBOM "name" as synonymous with product

I already opened up a couple of issues about adding CPE and PURL support as a way to differentiate:

But I think there's also a certain amount of clever we could do with heuristics for vendor lookups if searching for "name" without changes doesn't work.

  • try splitting on - and searching for pieces (as seen in bug: libraries ignored by cve-bin-tool ? #2846 which was using an SBOM related to github repos)
  • look at common patterns used in distro naming and remove prefixes that follow those patterns:
    • for example, looking at https://release-monitoring.org/project/3779 we can see that python-based projects might have python-, python2- or py3- as potential prefixes. (probably python3- too for older installs?)
    • Presumably there would be similar conventions for prefixes of packages in other environments such as rust or nodejs.

I think this is going to be most important for SBOMs but it's possible similar techniques would be useful in some of the language parsers. For the binary checkers we already have the vendor, product pair(s) explicitly set so they wouldn't need changes.

@terriko terriko added the enhancement New feature or request label Apr 27, 2023
@terriko terriko changed the title feat: adding some more heuristics to vendor lookup feat: heuristic splitting on - for lookups if vendor/product not found Apr 27, 2023
@mastersans
Copy link
Member

Hey @terriko I'll start working on this one.!!

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

Successfully merging a pull request may close this issue.

2 participants