-
Notifications
You must be signed in to change notification settings - Fork 69
67 lines (65 loc) · 2.02 KB
/
security.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
name: CVE Scanning
on:
workflow_dispatch:
schedule:
- cron: '0 8,18 * * 1-5'
push:
paths:
- '**/package.json'
- '**/package-lock.json'
- '**/Dockerfile'
- '.github/workflows/*-ignore-list.xml'
- '.github/workflows/security.yml'
jobs:
node-modules-scan:
name: ${{ matrix.module-folder }}-node-scan
runs-on: ubuntu-latest
continue-on-error: false
strategy:
matrix:
module-folder: [
'code',
'code/src/ui']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Build project with NPM
run: npm install --omit=dev
working-directory: ${{ matrix.module-folder }}
- name: Depcheck
uses: dependency-check/Dependency-Check_Action@main
id: Depcheck
with:
project: '${{ matrix.module-folder }}'
path: '${{ matrix.module-folder }}'
format: 'HTML'
out: '${{ matrix.module-folder }}-reports'
args: >
--suppression .github/node-cve-ignore-list.xml
--nodeAuditSkipDevDependencies
--nodePackageSkipDevDependencies
--failOnCVSS 5
--enableRetired
- name: Upload Test results
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: Depcheck report
path: ${{ github.workspace }}/${{ matrix.module-folder }}-reports
docker-scan:
name: ${{ github.event.repository.name }}-docker-scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker-practice/actions-setup-docker@ccc771627519a0dc44b99c63f3ccf5fab1b1b9b8
- name: Build
run: docker build -f Dockerfile -t user/app:latest .
working-directory: code
- name: Scan for vulnerabilities
uses: crazy-max/ghaction-container-scan@f17494a3e47d86fb17c2c1f89b25049492a82d1d
with:
image: user/app:latest