forked from metalstormbass/goof
-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (66 loc) · 1.96 KB
/
snyk_test_HTML.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: "Snyk Test HTML"
on:
push:
branches:
- master
jobs:
Pipeline-Job:
# Configure Environment
name: 'Snyk Test'
runs-on: ubuntu-latest
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
steps:
# Checkout Code
- name: Checkout Code
uses: actions/checkout@v1
# Install and Authenticate to Snyk
- name: Install Snyk & Authenticate
run: |
sudo npm install -g snyk
sudo npm install -g snyk-to-html
snyk auth ${SNYK_TOKEN}
# Run Snyk Open Source Test
- name: Run Snyk Open Source
run: |
# snyk test --severity-threshold=high
snyk test
continue-on-error: true
#Run Snyk Open Source to HTML
- name: Snyk Open Source to HTML
run: |
snyk test --json | snyk-to-html -o SCAVulns.html
snyk test --sarif > SCAresults.sarif
continue-on-error: true
#Run Synk Code test
- name: Snyk Code test
run: |
snyk code test
continue-on-error: true
#Run Synk Code to html
- name: Snyk Code
run: |
snyk code test --json | snyk-to-html -o CodeVulns.html
snyk code test --severity-threshold=high --sarif > codeResults.sarif
continue-on-error: true
# Store Artifact
- name: Upload HTML file
uses: actions/upload-artifact@v4
with:
# Path to HTML file relative to the root of the repository
name: Vulnerabilities
path: |
SCAVulns.html
CodeVulns.html
# Upload Results
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
# Path to SARIF file relative to the root of the repository
sarif_file: codeResults.sarif
# Upload Results
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
# Path to SARIF file relative to the root of the repository
sarif_file: SCAresults.sarif