diff --git a/internal/commands/scan_test.go b/internal/commands/scan_test.go index 0659433ae..536447c36 100644 --- a/internal/commands/scan_test.go +++ b/internal/commands/scan_test.go @@ -1027,6 +1027,15 @@ func Test_isDirFiltered(t *testing.T) { want: true, wantErr: false, }, + { + name: "WhenNodeModulesExcluded_ReturnIsFilteredTrue", + args: args{ + filename: "node_modules", + filters: commonParams.BaseExcludeFilters, + }, + want: true, + wantErr: false, + }, } for _, tt := range tests { ttt := tt diff --git a/internal/params/filters.go b/internal/params/filters.go index 4e1e5d0cc..bd665d196 100644 --- a/internal/params/filters.go +++ b/internal/params/filters.go @@ -141,6 +141,7 @@ var BaseExcludeFilters = []string{ "!.vs", "!.vscode", "!.idea", + "!node_modules", } var KicsBaseFilters = []string{