-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (39 loc) · 1.19 KB
/
snyk-security.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
name: Snyk Scan
on:
pull_request:
workflow_dispatch:
push:
branches: ["main"]
schedule:
- cron: "15 12 * * 1"
permissions: read-all
jobs:
security:
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
steps:
- name: checkout code
uses: actions/checkout@v4
with:
ref: main
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test --all-projects
args: --sarif-file-output=snyk.sarif
- name: Check to see if the SARIF was generated
id: sarif_file_exists
uses: andstor/file-existence-action@v2
with:
files: "snyk.sarif"
- name: Upload the SARIF file
uses: github/codeql-action/upload-sarif@v2
if: steps.sarif_file_exists.outputs.files_exists == 'true'
with:
sarif_file: snyk.sarif