File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Snyk scan
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ pull_request :
7
+ branches :
8
+ - main
9
+
10
+ jobs :
11
+ snyk-security :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v3
16
+
17
+ - name : Run Snyk to check for vulnerabilities
18
+ uses : snyk/actions/maven@master
19
+ continue-on-error : true # To make sure that SARIF upload gets called
20
+ env :
21
+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
22
+ with :
23
+ args : --all-projects --sarif-file-output=snyk.sarif
24
+
25
+ - name : Check output file
26
+ id : out-file
27
+ run : |
28
+ if test -f "snyk.sarif"; then
29
+ echo "::set-output name=exists::true"; else
30
+ echo "::set-output name=exists::false"
31
+ fi
32
+
33
+ - name : Upload result to GitHub Code Scanning
34
+ if : steps.out-file.outputs.exists == 'true'
35
+ uses : github/codeql-action/upload-sarif@v2
36
+ with :
37
+ sarif_file : snyk.sarif
You can’t perform that action at this time.
0 commit comments