fix sonar issues #208
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: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
snyk-security-scan: | |
runs-on: ubuntu-latest | |
name: Snyk Security Scan | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup PNPM | |
uses: pnpm/[email protected] | |
with: | |
version: latest | |
- name: Cache PNPM dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Cache Snyk cache folder | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/snyk | |
key: ${{ runner.os }}-snyk-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-snyk- | |
- name: Run Snyk to check for vulnerabilities | |
uses: snyk/actions/node@master | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_SECRET }} | |
with: | |
args: --severity-threshold=high |