Skip to content

Commit 91681ab

Browse files
authored
Update CVE scan actions to support mandatory OSS Index authentication (#1765)
* Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764) * Update Node CVE scanning workflow (#1764)
1 parent a357083 commit 91681ab

File tree

4 files changed

+64
-46
lines changed

4 files changed

+64
-46
lines changed

.github/workflows/cve-scanning-node.yml

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,51 @@ on:
55
paths:
66
- "**/package.json"
77
- ".github/workflows/cve-scanning-node.yml"
8-
- "vuu-ui/allow-list.json"
8+
- "vuu-ui/allow-list.xml"
99

1010
jobs:
11-
scan-packages:
11+
12+
node-modules-scan:
1213
runs-on: ubuntu-latest
13-
strategy:
14-
matrix:
15-
node-version: [20.x]
14+
15+
env:
16+
OSS_INDEX_USERNAME: ${{ secrets.OSS_INDEX_USERNAME }}
17+
OSS_INDEX_API_KEY: ${{ secrets.OSS_INDEX_API_KEY }}
18+
1619
steps:
17-
- uses: actions/checkout@v3
18-
- name: Use Node.js ${{ matrix.node-version }}
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Node
1924
uses: actions/setup-node@v3
2025
with:
21-
node-version: ${{ matrix.node-version }}
22-
- run: npm install --production
23-
working-directory: vuu-ui
24-
- run: npx --yes auditjs ossi --whitelist allow-list.json
26+
node-version: 20.x
27+
28+
- name: Build project with NPM
29+
run: npm install --omit=dev
2530
working-directory: vuu-ui
31+
32+
- name: Depcheck
33+
if: ${{ env.OSS_INDEX_USERNAME != '' && env.OSS_INDEX_API_KEY != '' }}
34+
uses: dependency-check/Dependency-Check_Action@1b5d19fd4a32ff0ff982e8c9d8e27dbf7ac8a46c
35+
id: Depcheck
36+
with:
37+
project: 'vuu-ui'
38+
path: 'vuu-ui'
39+
format: 'HTML'
40+
out: 'reports'
41+
args: >
42+
--ossIndexUsername ${{ env.OSS_INDEX_USERNAME }}
43+
--ossIndexPassword ${{ env.OSS_INDEX_API_KEY }}
44+
--suppression allow-list.xml
45+
--nodeAuditSkipDevDependencies
46+
--nodePackageSkipDevDependencies
47+
--failOnCVSS 7
48+
--enableRetired
49+
50+
- name: Upload Test results
51+
if: ${{ always() }}
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: Depcheck report
55+
path: ${{ github.workspace }}/reports

.github/workflows/cve-scanning.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,37 @@ on:
88
- ".github/workflows/cve-scanning.yml"
99

1010
jobs:
11+
1112
depchecktest:
1213
runs-on: ubuntu-latest
13-
name: depecheck_test
14+
15+
env:
16+
OSS_INDEX_USERNAME: ${{ secrets.OSS_INDEX_USERNAME }}
17+
OSS_INDEX_API_KEY: ${{ secrets.OSS_INDEX_API_KEY }}
18+
1419
steps:
1520
- name: Checkout
1621
uses: actions/checkout@v3
22+
1723
- name: Build project with Maven
18-
run: mvn clean install
19-
- name: Depcheck
20-
uses: dependency-check/Dependency-Check_Action@78155aab85e9867e3c35f533e9ddad8ba7cdad7b # v2
24+
run: mvn clean install -DskipTests
25+
26+
- name: Run OWASP Dependency-Check on Maven subprojects
27+
if: ${{ env.OSS_INDEX_USERNAME != '' && env.OSS_INDEX_API_KEY != '' }}
28+
uses: dependency-check/Dependency-Check_Action@1b5d19fd4a32ff0ff982e8c9d8e27dbf7ac8a46c
2129
id: Depcheck
2230
with:
2331
project: "vuu"
24-
path: "./vuu"
32+
path: "vuu"
2533
format: "HTML"
2634
out: "reports" # this is the default, no need to specify unless you wish to override it
27-
args: >
28-
--failOnCVSS 5
35+
args: >
36+
--ossIndexUsername ${{ env.OSS_INDEX_USERNAME }}
37+
--ossIndexPassword ${{ env.OSS_INDEX_API_KEY }}
38+
--suppression allow-list.xml
39+
--failOnCVSS 7
2940
--enableRetired
41+
3042
- name: Upload Test results
3143
if: ${{ always() }}
3244
uses: actions/upload-artifact@v4

vuu-ui/allow-list.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

vuu-ui/allow-list.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
3+
4+
</suppressions>

0 commit comments

Comments
 (0)