From the accepted Stack Overflow answer: Yes, unfortunately this is confusing today. For historical reasons, the .snyk file only applies to Snyk Code (SAST). To exclude directories for the open source part, you need to: In an SCM import, add the list to exclude (screenshot) In a CLI import, add the directories as arguments (syntax below) --exclude=DIRECTORY[,DIRECTORY]...&gt; (only in test and monitor commands) Can be used with --all-projects and --yarn-workspaces to indicate sub-directories and files to exclude. Must be comma separated. This is confusing because these are two separate mechanisms. In the future, both mechanisms will be the same, but for now, both need to be done.

Context: Problem: Accepted solution (score 5): Yes, unfortunately this is confusing today. For historical reasons, the .snyk file only applies to Snyk Code (SAST). To exclude directories for the open source part, you need to: In an SCM import, add the list to exclude (screenshot) In a CLI import, add the directories as arguments (syntax below) --exclude=DIRECTORY[,DIRECTORY]...&gt; (only in test and monitor commands) Can be used with --all-projects and --yarn-workspaces to indicate sub-directories and files to exclude. Must be comma separated. This is confusing because these are two separate mechanisms. In the future, both mechanisms will be the same, but for now, both need to be done.