diff --git a/syft/file/cataloger/executable/cataloger.go b/syft/file/cataloger/executable/cataloger.go index c397df6e3..b7bf28adc 100644 --- a/syft/file/cataloger/executable/cataloger.go +++ b/syft/file/cataloger/executable/cataloger.go @@ -151,7 +151,7 @@ func DefaultConfig() Config { Globs: nil, Symbols: SymbolConfig{ CaptureScope: []SymbolCaptureScope{}, // important! by default we do not capture any symbols unless explicitly configured - Types: []string{"T"}, // by default only capture "T" (text/code) symbols, since vulnerability data tracks accessible function symbols + Types: []string{"T", "t"}, // by default only capture "T" (text/code) symbols, since vulnerability data tracks accessible function symbols Go: GoSymbolConfig{ StandardLibrary: true, ExtendedStandardLibrary: true, diff --git a/syft/file/cataloger/executable/config_test.go b/syft/file/cataloger/executable/config_test.go index 121c5b1f2..726dff0f5 100644 --- a/syft/file/cataloger/executable/config_test.go +++ b/syft/file/cataloger/executable/config_test.go @@ -16,6 +16,8 @@ func TestDefaultConfig_SymbolCaptureIsDisabled(t *testing.T) { require.Empty(t, cfg.Symbols.CaptureScope, "symbol capture should be disabled by default (empty capture scope)") + assert.Equal(t, cfg.Symbols.Types, []string{"T", "t"}) + // verify that shouldCaptureSymbols returns false for any executable when using default config assert.False(t, shouldCaptureSymbols(nil, cfg.Symbols), "should not capture symbols for nil executable") assert.False(t, shouldCaptureSymbols(&file.Executable{}, cfg.Symbols), "should not capture symbols for empty executable")