Snyk Node Action

This page provides examples of using the Snyk GitHub Action for Node. For instructions on using the action and further information see GitHub Actions integration.

Using the Snyk Node Action to check for vulnerabilities

You can use the Snyk Node Action to check for vulnerabilities as follows:

name: Example workflow for Node using Snyk
on: push
jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Run Snyk to check for vulnerabilities
        uses: snyk/actions/node@master
        env:
          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

You can use the Snyk Node Action to check for only high severity vulnerabilities as follows:

name: Example workflow for Node using Snyk
on: push
jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Run Snyk to check for vulnerabilities
        uses: snyk/actions/node@master
        env:
          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
        with:
          args: --severity-threshold=high