Skip to content

Commit

Permalink
Merge pull request #910 from Checkmarx/feature/excludeNodeModules
Browse files Browse the repository at this point in the history
Exclude node modules folder from the scan. (AST-70022)
  • Loading branch information
sarahCx authored Oct 15, 2024
2 parents 8bcbea2 + e712243 commit c45a575
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/commands/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions internal/params/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ var BaseExcludeFilters = []string{
"!.vs",
"!.vscode",
"!.idea",
"!node_modules",
}

var KicsBaseFilters = []string{
Expand Down

0 comments on commit c45a575

Please sign in to comment.