Skip to content

Commit f1ba34a

Browse files
NickChungSUSExingzhang-suse
authored andcommitted
Feat: Download report and display image detail list on Image details page
1 parent 0d585ec commit f1ba34a

File tree

11 files changed

+2175
-402
lines changed

11 files changed

+2175
-402
lines changed

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

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

pkg/sbombastic-image-vulnerability-scanner/components/__tests__/ImageDetails.spec.ts

Lines changed: 409 additions & 50 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
@@ -456,3 +456,35 @@ export const VULNERABILITIES_DETAIL_SUB_IMAGES_TABLE = [
456456
sort: "packagePath",
457457
},
458458
];
459+
460+
export const LAYER_BASED_TABLE = [
461+
{
462+
name: "layerId",
463+
labelKey: "imageScanner.imageDetails.table.headers.layerId",
464+
value: "layerId",
465+
sort: "layerId",
466+
width: 500, // Increased width to accommodate decoded layer information
467+
},
468+
{
469+
name: "vulnerabilities",
470+
labelKey: "imageScanner.imageDetails.table.headers.vulnerabilities",
471+
value: "vulnerabilities",
472+
formatter: "IdentifiedCVEsCell",
473+
sort: "vulnerabilities",
474+
width: 300,
475+
},
476+
{
477+
name: "updated",
478+
labelKey: "imageScanner.imageDetails.table.headers.updated",
479+
value: "updated",
480+
sort: "updated",
481+
width: 150,
482+
},
483+
{
484+
name: "size",
485+
labelKey: "imageScanner.imageDetails.table.headers.size",
486+
value: "size",
487+
sort: "size",
488+
width: 120,
489+
}
490+
]

0 commit comments

Comments
 (0)