Skip to content

Snyk (1418/merge) #3360

Snyk (1418/merge)

Snyk (1418/merge) #3360

Workflow file for this run

name: Snyk
run-name: ${{ github.workflow }} (${{ github.ref_name }})
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
env:
NODE_VERSION: '18'
# Declare default permissions as read only.
permissions: read-all
jobs:
snyk:
name: Check for vulnerabilities with Snyk
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ !github.event.pull_request.draft }}
permissions:
# * Needed to upload the results to code-scanning dashboard.
security-events: write
steps:
- name: Checkout Repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Initialize
uses: ./.github/actions/setup-node-and-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@8349f9043a8b7f0f3ee8885bf28f0b388d2446e8 # V0.4.0
# * To make sure that SARIF upload gets called.
continue-on-error: true
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@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
with:
sarif_file: snyk.sarif