-
Notifications
You must be signed in to change notification settings - Fork 5
/
action.yml
51 lines (41 loc) · 1.43 KB
/
action.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
name: 'Snyk Job Summary Action'
description: 'Add a Job Summary from Snyk reports, also uploads HTML reports to Github Packages'
inputs:
DependenciesReportPath:
description: 'json file path generated by snyk test command'
required: false
default: snyk_dependencies.json
CodeReportPath:
description: 'json file path generated by snyk code test command'
required: false
default: snyk_code.json
runs:
using: composite
steps:
- uses: actions/setup-node@v3
- run: npm install snyk-to-html --location=global
shell: bash
- name: convert Snyk Dependencies json to html format
run: snyk-to-html -i ${{inputs.DependenciesReportPath}} -o snyk_dependencies.html
shell: bash
- name: convert Snyk Code json to html format
run: snyk-to-html -i ${{inputs.CodeReportPath}} -o snyk_code.html
shell: bash
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: snyk-details
path: |
snyk_dependencies.html
snyk_code.html
retention-days: 60
if-no-files-found: ignore
- run: pip install mdutils
name: install mdutils
shell: bash
- name: Run script
run: python ${{ github.action_path }}/job_summary.py ${{inputs.DependenciesReportPath}} ${{inputs.CodeReportPath}}
shell: bash
- name: Add output to Job Summary
run: cat vulnerabilities.md >> $GITHUB_STEP_SUMMARY
shell: bash