Skip to content

Commit 0e4c9b9

Browse files
committed
Feat: Download report and display image detail list on Image details page
1 parent cd48360 commit 0e4c9b9

File tree

9 files changed

+1763
-351
lines changed

9 files changed

+1763
-351
lines changed

pkg/sbombastic-image-vulnerability-scanner/components/ImageDetails.vue

Lines changed: 1073 additions & 170 deletions
Large diffs are not rendered by default.

pkg/sbombastic-image-vulnerability-scanner/components/common/ScoreBadge.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@
2222
severity() {
2323
if (!this.score) {
2424
return 'na';
25-
} else if (this.score >= 9.5) {
25+
}
26+
const scoreNum = parseFloat(this.score);
27+
if (scoreNum >= 9.5) {
2628
return 'critical';
27-
} else if (this.score >= 8.0) {
29+
} else if (scoreNum >= 8.0) {
2830
return 'high';
29-
} else if (this.score >= 6.0) {
31+
} else if (scoreNum >= 6.0) {
3032
return 'medium';
3133
} else {
3234
return 'low';

pkg/sbombastic-image-vulnerability-scanner/config/table-headers.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,3 +457,35 @@ export const VULNERABILITIES_DETAIL_SUB_IMAGES_TABLE = [
457457
sort: "packagePath",
458458
},
459459
];
460+
461+
export const LAYER_BASED_TABLE = [
462+
{
463+
name: "layerId",
464+
labelKey: "imageScanner.imageDetails.table.headers.layerId",
465+
value: "layerId",
466+
sort: "layerId",
467+
width: 500, // Increased width to accommodate decoded layer information
468+
},
469+
{
470+
name: "vulnerabilities",
471+
labelKey: "imageScanner.imageDetails.table.headers.vulnerabilities",
472+
value: "vulnerabilities",
473+
formatter: "IdentifiedCVEsCell",
474+
sort: "vulnerabilities",
475+
width: 300,
476+
},
477+
{
478+
name: "updated",
479+
labelKey: "imageScanner.imageDetails.table.headers.updated",
480+
value: "updated",
481+
sort: "updated",
482+
width: 150,
483+
},
484+
{
485+
name: "size",
486+
labelKey: "imageScanner.imageDetails.table.headers.size",
487+
value: "size",
488+
sort: "size",
489+
width: 120,
490+
}
491+
]

0 commit comments

Comments
 (0)