-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 960 Bytes
/
snyk.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
name: Snyk Vulnerability Scanner
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
snyk:
permissions:
contents: read
security-events: write
actions: read
runs-on: ubuntu-latest
steps:
- name: Checkout repository ${{ github.repository }}
uses: actions/checkout@v4
- name: Setup Snyk CLI to check security issues
uses: snyk/actions/setup@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Authenticate to Snyk API
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: |
snyk config set api=$SNYK_TOKEN
snyk auth $SNYK_TOKEN
- name: Snyk code get sarif
run: snyk code test --sarif-file-output=snyk-code.sarif
- name: Upload sarif result
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk-code.sarif