From 413cf9c3011dbaa20e1b603a8fcef2816f874e16 Mon Sep 17 00:00:00 2001 From: Peter Nguyen Date: Fri, 13 Sep 2024 15:16:12 -0400 Subject: [PATCH] Add ruby -base package instead of default package for gem dependencies --- pkg/sca/sca.go | 4 ++-- pkg/sca/sca_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/sca/sca.go b/pkg/sca/sca.go index 1e59b51d1..6692dc7cc 100644 --- a/pkg/sca/sca.go +++ b/pkg/sca/sca.go @@ -577,8 +577,8 @@ func generateRubyDeps(ctx context.Context, hdl SCAHandle, generated *config.Depe } } - log.Infof(" found ruby gem, generating ruby-%s dependency", rubyGemVer) - generated.Runtime = append(generated.Runtime, fmt.Sprintf("ruby-%s", rubyGemVer)) + log.Infof(" found ruby gem, generating ruby-%s-base dependency", rubyGemVer) + generated.Runtime = append(generated.Runtime, fmt.Sprintf("ruby-%s-base", rubyGemVer)) return nil } diff --git a/pkg/sca/sca_test.go b/pkg/sca/sca_test.go index 5fada7497..22f42c808 100644 --- a/pkg/sca/sca_test.go +++ b/pkg/sca/sca_test.go @@ -210,7 +210,7 @@ func TestRubySca(t *testing.T) { t.Fatal(err) } - want := config.Dependencies{Runtime: []string{"ruby-3.2"}} + want := config.Dependencies{Runtime: []string{"ruby-3.2-base"}} if diff := cmp.Diff(want, got); diff != "" { t.Errorf("Analyze(): (-want, +got):\n%s", diff)