Skip to content

Commit 73fef22

Browse files
committed
Fallback to 0 vulns if field is not present
1 parent f56e8e1 commit 73fef22

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

dist/index.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/summary.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ function addVulnTableToSummary(data: Report) {
3232
core.summary.addBreak();
3333
core.summary.addTable([
3434
[{ data: '', header: true }, { data: '🟣 Critical', header: true }, { data: '🔴 High', header: true }, { data: '🟠 Medium', header: true }, { data: '🟡 Low', header: true }, { data: '⚪ Negligible', header: true }],
35-
[{ data: '⚠️ Total Vulnerabilities', header: true }, `${totalVuln.critical}`, `${totalVuln.high}`, `${totalVuln.medium}`, `${totalVuln.low}`, `${totalVuln.negligible}`],
36-
[{ data: '🔧 Fixable Vulnerabilities', header: true }, `${fixableVuln.critical}`, `${fixableVuln.high}`, `${fixableVuln.medium}`, `${fixableVuln.low}`, `${fixableVuln.negligible}`],
35+
[{ data: '⚠️ Total Vulnerabilities', header: true }, `${totalVuln.critical ?? 0}`, `${totalVuln.high ?? 0}`, `${totalVuln.medium ?? 0}`, `${totalVuln.low ?? 0}`, `${totalVuln.negligible ?? 0}`],
36+
[{ data: '🔧 Fixable Vulnerabilities', header: true }, `${fixableVuln.critical ?? 0}`, `${fixableVuln.high ?? 0}`, `${fixableVuln.medium ?? 0}`, `${fixableVuln.low ?? 0}`, `${fixableVuln.negligible ?? 0}`],
3737
]);
3838
}
3939

0 commit comments

Comments
 (0)