Snyk Security Scan #72
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 Security Scan | |
on: | |
push: | |
branches: [main, dev, 'release/*'] | |
pull_request: | |
branches: [main, dev, 'release/*'] | |
jobs: | |
# # Snyk Security Scan : scan for vulnerabilities and create a SARIF file | |
# security: | |
# runs-on: ubuntu-latest | |
# if: github.event_name == 'push' | |
# steps: | |
# - uses: actions/checkout@master | |
# - name: Install dependencies | |
# run: npm install | |
# - name: Run Snyk to check for vulnerabilities | |
# uses: snyk/actions/node@master | |
# continue-on-error: true # To make sure that SARIF upload gets called | |
# env: | |
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
# with: | |
# args: --sarif-file-output=snyk.sarif | |
# - name: Upload result to GitHub Code Scanning | |
# uses: github/codeql-action/upload-sarif@v3 | |
# with: | |
# sarif_file: snyk.sarif | |
# Block merge if vulnerabilities are found | |
merge_security: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- uses: actions/checkout@master | |
- name: Install dependencies | |
run: npm install | |
- name: Run Snyk to check for vulnerabilities | |
uses: snyk/actions/node@master | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
args: --severity-threshold=high --fail-on=high | |