mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 02:26:42 +01:00
keep both local and global symbols
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
parent
bf1f0ceea3
commit
281a9b87de
@ -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,
|
||||
|
||||
@ -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")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user