keep both local and global symbols

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
Alex Goodman 2025-12-11 14:20:44 -05:00
parent bf1f0ceea3
commit 281a9b87de
2 changed files with 3 additions and 1 deletions

View File

@ -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,

View File

@ -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")