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

Incorrect vulnerability mapping for Ruby #4804

Closed
zwass opened this issue Mar 25, 2022 · 2 comments
Closed

Incorrect vulnerability mapping for Ruby #4804

zwass opened this issue Mar 25, 2022 · 2 comments
Assignees
Labels
~backend Backend-related issue. bug Something isn't working as documented #legacy-platform-group Legacy: platform group
Milestone

Comments

@zwass
Copy link
Member

zwass commented Mar 25, 2022

Fleet version: 4.11.0

Operating system: Host is macOS


💥  Actual behavior

https://dogfood.fleetdm.com/hosts/manage/?order_key=hostname&order_direction=asc&team_id=2&software_id=21269

Screen Shot 2022-03-24 at 5 06 24 PM

The linked CVE (https://nvd.nist.gov/vuln/detail/CVE-2021-21289) is for a particular Ruby library (mechanize), but Fleet incorrectly matches this to the Ruby version installed.

There is probably a whole "class" of false positives generated by CVEs reported against Ruby libraries (and perhaps other ecosystems such as Python?)

More info

@chiiph
Copy link
Contributor

chiiph commented Aug 19, 2022

@michalnicp would this be tackled by your macOS improvements?

@michalnicp michalnicp assigned michalnicp and unassigned chiiph Aug 24, 2022
@michalnicp
Copy link
Contributor

This is a false positive that gets flagged because the ruby library mechanize has the word "ruby" in the title, and happens to have a version that matches a ruby version.

sqlite> select * from cpe where vendor = 'mechanize_project' and version = '2.7.5';
rowid   cpe23                                                         title                                       vendor             product    version  target_sw  deprecated
------  ------------------------------------------------------------  ------------------------------------------  -----------------  ---------  -------  ---------  ----------
501712  cpe:2.3:a:mechanize_project:mechanize:2.7.5:*:*:*:*:ruby:*:*  Mechanize Project Mechanize 2.7.5 for Ruby  mechanize_project  mechanize  2.7.5    ruby       0         

We could add an entry to the cpe_translations.json introduced in #6985 like the following

[
   {
     "match": {
       "name": ["[email protected]", ...],
       "source": ["homebrew_packages"]
     },
     "translation": {
       "product": ["ruby"],
       "vendor": ["ruby-lang"]
     }
   }
 ]

but we would need to potentially add an entry for every major.minor ruby version and keep this up to date

@chiiph chiiph assigned juan-fdz-hawa and unassigned michalnicp Aug 30, 2022
@michalnicp michalnicp moved this from 🥚 Ready to ✔️ ‎ ‎‎‎Awaiting QA in 🚀 Release Sep 8, 2022
@xpkoala xpkoala moved this from ✔️ ‎ ‎‎‎Awaiting QA to ✅ Ready for release in 🚀 Release Sep 8, 2022
@lukeheath lukeheath added this to the 4.20.0 milestone Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~backend Backend-related issue. bug Something isn't working as documented #legacy-platform-group Legacy: platform group
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants