To continuously avoid known vulnerabilities in your dependencies, integrate Snyk into your continuous integration (a.k.a. build) system.
npm install -g snyk
.snyk wizard
in the directory of your project following the prompts which will also generate a .snyk policy file.npm install -g snyk
.If you monitor a project with Snyk, you’ll get notified if your project’s dependencies are affected by newly disclosed vulnerabilities. To make sure the list of dependencies we have for your project is up to date, refresh it continuously by running snyk monitor
in your deployment process.
Configure your environment to include the SNYK_TOKEN
environment variable. You can find your API token on the dashboard after logging in.
Make sure you don’t check your API token into source control, to avoid exposing it to others. Instead, use your CI environment variables to configure it.
See guidance for how to do this on: