-
Notifications
You must be signed in to change notification settings - Fork 93
85 lines (79 loc) · 1.97 KB
/
vulnerability-scan.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
79
80
81
82
83
84
85
name: "Security vulnerability scan"
on:
schedule:
- cron: "20 23 * * *"
workflow_dispatch:
permissions:
contents: read
env:
GO_VERSION: '1.21'
jobs:
go:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target:
- govulncheck
- nancy
- osv-scanner
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Scan
run: make scan-go-${{ matrix.target }}
node:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target:
- npm-audit
- osv-scanner
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up Go
if: matrix.target == 'osv-scanner'
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Scan
run: make scan-node-${{ matrix.target }}
java:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target:
- dependency-check
- osv-scanner
steps:
- uses: actions/checkout@v4
- name: Set up Java
if: matrix.target != 'osv-scanner'
uses: actions/setup-java@v3
with:
java-version: 21
distribution: temurin
cache: maven
- name: Set up Go
if: matrix.target == 'osv-scanner'
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Scan
run: make scan-java-${{ matrix.target }}
- name: "Archive dependency-check report"
if: (success() || failure()) && matrix.target == 'dependency-check'
uses: actions/upload-artifact@v3
with:
name: dependency-check-report
path: java/target/dependency-check-report.html