diff --git a/.github/workflows/synk-scans.yml b/.github/workflows/synk-scans.yml new file mode 100644 index 00000000..d08aca34 --- /dev/null +++ b/.github/workflows/synk-scans.yml @@ -0,0 +1,36 @@ + +name: snyk scans + +on: + push: + branches: + - main + pull_request: + paths: + - '.github/workflows/snyk-scans.yml' + +jobs: + snyk-scan: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + + - name: Set up Snyk + uses: snyk/actions/setup@master + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + + - name: Run Snyk to check for vulnerabilities + run: | + snyk test --all-projects \ + --severity-threshold=high \ + --exclude=docs,cmake,ext \ + --detection-depth=5 + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + continue-on-error: false + + - name: Upload result to GitHub Code Scanning + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: snyk.sarif \ No newline at end of file