Scoping scans

Learn how to effectively scope your scans with Endor Labs inclusion and exclusion patterns.

Setup scan inclusion and exclusion patterns

Exclude and include filters help your team to focus their attention on the open source packages that matter most and to improve scan performance. Inclusion and exclusion patterns may not be used together so its important to pick a strategy that works best for you. We generally reccomend using inclusion patterns when you have many packages that you want to scan separately and exclsuion patterns when you want to filter our packages that are not important to you.

You can include or exclude packages using the following standard patterns:

  1. Include or exclude specific packages
  2. Include or exclude specific directories
  3. Include or exclude with a golang style regex pattern.

To include or exclude a package based on its file name:

endorctl scan --include=path/to/your/manifest/file/package.json
endorctl scan --exclude=path/to/your/manifest/file/package.json

To include or exclude a package based on its directory

endorctl scan --include="directory/path/"
endorctl scan --exclude="path/to/your/manifest/"

To exclude or include using a Golang style regex:

endorctl scan --include=".*/build/.*"
endorctl scan --exclude=".*/build/.*"