-
Notifications
You must be signed in to change notification settings - Fork 602
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
Look for ruby binary library evidence over executable #3420
Comments
For what it's worth, we are doing something sorta like this for libpython -- if it finds a |
Thank you for your advice. Yes, ruby also use sharedLibraryLookup.
I think checking libruby.so.* (in this case, libruby.so.3.2.1) directly will be required, like "python-binary-lib". So, I have no good idea for this. |
Hey @witchcraze -- it looks like the Python binary matcher does the shared library lookup first, whereas the ruby does it second -- I wonder if there's some issue that the first evidence matcher is returning garbage and preventing the shared library lookup from running? It looks like the pattern should pick up Here's the problematic spot: https://github.com/anchore/syft/blob/main/syft/pkg/cataloger/binary/classifiers.go#L386C5-L390C19 -- note the
|
Thank you for your comment. In local, I updated like this, but ruby is not shown.
This is another test.
|
Thanks to ChatGPT, I got simple solution.
|
What happened:
At first, this is very rare case, and ruby image side bug
I noticed syft can not detect ruby in these images.
rubylang/ruby:3.2.1-jammy-amd64-7a04a2654b938d96a521d2f8eff3439e19b8fa60
rubylang/ruby:3.2.1-jammy-arm64-7a04a2654b938d96a521d2f8eff3439e19b8fa60
rubylang/ruby:3.2.1-focal-amd64-7a04a2654b938d96a521d2f8eff3439e19b8fa60
rubylang/ruby:3.2.1-focal-arm64-7a04a2654b938d96a521d2f8eff3439e19b8fa60
rubylang/ruby:3.2.1-focal-arm64-43f3e1222e5df987e7adc637cf0ee17b45525bda
rubylang/ruby:3.2.1-focal-amd64-43f3e1222e5df987e7adc637cf0ee17b45525bda
rubylang/ruby:3.2.1-jammy-arm64-43f3e1222e5df987e7adc637cf0ee17b45525bda
rubylang/ruby:3.2.1-jammy-amd64-43f3e1222e5df987e7adc637cf0ee17b45525bda
rubylang/ruby:3.2.1-jammy-arm64-424ef1bccb4b1631c2a3a769656e2e01b6fceff4
rubylang/ruby:3.2.1-jammy-amd64-424ef1bccb4b1631c2a3a769656e2e01b6fceff4
What you expected to happen:
ruby is detected
Maybe, need to check libruby.so.3.2.1 directry...
Steps to reproduce the issue:
Anything else we need to know?:
As libruby.so.3.2 is nothing in initial status, ruby version is not shown.
I noticed by chance, after installing bin-utils, ruby version is shown.
The text was updated successfully, but these errors were encountered: