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

fix(sca): Correctly check for existing Ruby runtime dependency #1387

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

EyeCantCU
Copy link
Member

With Python, we can get away with checking for the "python" prefix in the package name as all other Python packages are prefixed with py<X.Y> instead of "python". For Ruby however, main Ruby packages follow a "ruby-<X.Y>" syntax and Ruby packages are "ruby<X.Y>"

This addresses the above by checking for "ruby-" instead of "ruby". In case a package explicitly sets "ruby" as a runtime dependency to pull in the latest version, we just skip over it

SCA Changes

  • Examining several representative APKs show no regression / the desired effect (details in notes)

Notes: Ran against packages without a versioned Ruby rt dep, ran with it set, and ran with just ruby set

With Python, we can get away with checking for the "python" prefix in
the package name as all other Python packages are prefixed with py<X.Y>
instead of "python". For Ruby however, main Ruby packages follow a
"ruby-<X.Y>" syntax and Ruby packages are "ruby<X.Y>"

This addresses the above by checking for "ruby-" instead of "ruby". In
case a package explicitly sets "ruby" as a runtime dependency to pull
in the latest version, we just skip over it

Signed-off-by: RJ Sampson <rj.sampson@chainguard.dev>
@jdolitsky jdolitsky merged commit 6507903 into main Jul 19, 2024
29 checks passed
@jdolitsky jdolitsky deleted the fix-ruby-sca branch July 19, 2024 13:58
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