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

Add ruby binary classifier #1580

Closed
wants to merge 2 commits into from
Closed

Add ruby binary classifier #1580

wants to merge 2 commits into from

Conversation

noqcks
Copy link
Contributor

@noqcks noqcks commented Feb 17, 2023

Adding a ruby binary pkg classifier

I think this would be nice to have, however there is one caveat....

For older versions of ruby, matching is precise, we're matching on this text and return version 2.0.0

ruby 2.0.0p648 (2015-12-16 revision 53162)

For newer versions of ruby, we can't match the patch version, so even if ruby 2.5.1 is installed, we only return version 2.5. This is because we're matching on the library file libruby.so from this text string

__deregister_frame_info_ITM_deregisterTMCloneTable__cxa_finalize__register_frame_info_ITM_registerTMCloneTableruby_run_node_finiruby_initruby_optionsruby_init_stackruby_sysinitsetlocale__libc_start_mainlibruby.so.2.5libc.musl-x86_64.so.1_start_c__bss_start_edata_end/usr/local/

If the latter is unacceptable, we can just match on versions we can find the full semver

Signed-off-by: Benji Visser <benji@093b.org>
@kzantow
Copy link
Contributor

kzantow commented Feb 17, 2023

Thanks for the contribution @noqcks! Could you link to a few images that this should work with?

@noqcks
Copy link
Contributor Author

noqcks commented Feb 17, 2023

ruby:2.0
ruby:2.5
ruby:3.2
ruby:3.2.1-buster

Signed-off-by: Benji Visser <benji@093b.org>
@noqcks noqcks closed this by deleting the head repository Feb 18, 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

Successfully merging this pull request may close these issues.

2 participants