Skip to content

Commit c7c422a

Browse files
authored
Merge pull request #765 from netboxlabs/feat/add-source-column-to-scan-tables
feat: add Source column to vulnerability scan tables
2 parents 2ed7470 + 517345d commit c7c422a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/container-rescan.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ jobs:
4848
if (vulns.length === 0) {
4949
summary += '_No vulnerabilities found._\n';
5050
} else {
51-
summary += '| Library | CVE | Severity | Installed | Fixed | Title |\n|---|---|---|---|---|---|\n';
51+
summary += '| Source | Library | CVE | Severity | Installed | Fixed | Title |\n|---|---|---|---|---|---|---|\n';
5252
for (const v of vulns) {
5353
const title = (v.Title || '').replace(/\|/g, '\\|').substring(0, 80);
5454
const cve = v.PrimaryURL ? `[${v.VulnerabilityID}](${v.PrimaryURL})` : v.VulnerabilityID;
55-
summary += `| ${v.PkgName} | ${cve} | ${SEVERITY_LABEL[v.Severity] || v.Severity} | ${v.InstalledVersion} | ${v.FixedVersion || 'N/A'} | ${title} |\n`;
55+
const source = (v.target || '').replace(/\|/g, '\|');
56+
summary += `| ${source} | ${v.PkgName} | ${cve} | ${SEVERITY_LABEL[v.Severity] || v.Severity} | ${v.InstalledVersion} | ${v.FixedVersion || 'N/A'} | ${title} |\n`;
5657
}
5758
}
5859
fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, summary);

0 commit comments

Comments
 (0)