Skip to content

Commit 4946b05

Browse files
committed
SCA: Implement feature flag for versioned shlib depends
Let's err on the side of caution and only enable versioned shared library dependencies if the environment variable MELANGE_VERSIONED_SHLIB_DEPENDS is non-empty. Signed-off-by: Sergio Durigan Junior <[email protected]>
1 parent 0aebf2b commit 4946b05

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/sca/sca.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"fmt"
2525
"io"
2626
"io/fs"
27+
"os"
2728
"path/filepath"
2829
"slices"
2930
"strings"
@@ -298,6 +299,11 @@ func dereferenceCrossPackageSymlink(hdl SCAHandle, path string, extraLibDirs []s
298299
func determineShlibVersion(ctx context.Context, hdl SCAHandle, shlib string) (string, error) {
299300
log := clog.FromContext(ctx)
300301

302+
// Feature flag to disable versioned shlib dependencies.
303+
if os.Getenv("MELANGE_VERSIONED_SHLIB_DEPENDS") == "" {
304+
return "", nil
305+
}
306+
301307
if hdl.Options().NoVersionedShlibDeps {
302308
// This package does not care about versioned shlib
303309
// depends.

0 commit comments

Comments
 (0)