generated from finos-labs/project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 92
68 lines (65 loc) · 2.51 KB
/
cve-scanning-node.yml
File metadata and controls
68 lines (65 loc) · 2.51 KB
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
name: CVE Scanning for Node.js
permissions:
contents: read
id-token: write
on:
workflow_dispatch:
schedule:
- cron: "0 8,18 * * 1-5"
push:
paths:
- "**/package.json"
- "**/package-lock.json"
- ".github/workflows/node-cve-ignore-list.xml"
- ".github/workflows/cve-scanning-node.yml"
pull_request:
paths:
- "**/package.json"
- "**/package-lock.json"
- ".github/workflows/node-cve-ignore-list.xml"
- ".github/workflows/cve-scanning-node.yml"
jobs:
node-modules-scan:
name: ${{ matrix.module-folder }}-node-scan
runs-on: ubuntu-latest
environment:
name: code-scan
continue-on-error: false
strategy:
matrix:
module-folder: ["cli", "docs", "shared"]
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Set up Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: 22
- name: Build project with NPM
run: npm install --omit=dev --ignore-scripts
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
--ossIndexUsername ${{ vars.OSS_INDEX_USERNAME }}
--ossIndexPassword ${{ vars.OSS_INDEX_PASSWORD }}
- run: |
echo `echo UPNAME=${{matrix.module-folder}} | tr '/' '-'` >> $GITHUB_ENV
shell: bash
- name: Upload Test results
if: ${{ always() }}
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: Depcheck report ${{ env.UPNAME }}
path: ${{ github.workspace }}/${{ matrix.module-folder }}-reports