Merge pull request #290 from hanshal101/add-synk-scans #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |