@@ -12,8 +12,10 @@ const SecurityDetailsCards = ({ scanResult, Sidebar }: SecurityDetailsCardsProps
12
12
const [ modalState , setModalState ] = useState < SecurityModalStateType > ( DEFAULT_SECURITY_MODAL_IMAGE_STATE )
13
13
const { imageScan, codeScan, kubernetesManifest } = scanResult
14
14
15
- const scanToolId =
15
+ const imageScanToolId =
16
16
imageScan ?. vulnerability ?. list ?. [ 0 ] . scanToolName === 'TRIVY' ? SCAN_TOOL_ID_TRIVY : SCAN_TOOL_ID_CLAIR
17
+ const codeScanToolId = codeScan ?. scanToolName === 'TRIVY' ? SCAN_TOOL_ID_TRIVY : SCAN_TOOL_ID_CLAIR
18
+ const manifestScanToolId = kubernetesManifest ?. scanToolName === 'TRIVY' ? SCAN_TOOL_ID_TRIVY : SCAN_TOOL_ID_CLAIR
17
19
18
20
const handleCardClick = (
19
21
category : SecurityCardProps [ 'category' ] ,
@@ -38,7 +40,7 @@ const SecurityDetailsCards = ({ scanResult, Sidebar }: SecurityDetailsCardsProps
38
40
< div className = "flexbox-col dc__gap-12" >
39
41
< div className = "flexbox dc__content-space pb-8 dc__border-bottom-n1" >
40
42
< span className = "fs-13 fw-6 lh-1-5 cn-9" > Image Scan</ span >
41
- < ScannedByToolModal scanToolId = { scanToolId } />
43
+ < ScannedByToolModal scanToolId = { imageScanToolId } />
42
44
</ div >
43
45
< div className = "flexbox dc__gap-12" >
44
46
< SecurityCard
@@ -62,7 +64,7 @@ const SecurityDetailsCards = ({ scanResult, Sidebar }: SecurityDetailsCardsProps
62
64
< div className = "flexbox-col dc__gap-12" >
63
65
< div className = "flexbox dc__content-space pb-8 dc__border-bottom-n1" >
64
66
< span className = "fs-13 fw-6 lh-1-5 cn-9" > Code Scan</ span >
65
- < ScannedByToolModal scanToolId = { scanToolId } />
67
+ < ScannedByToolModal scanToolId = { codeScanToolId } />
66
68
</ div >
67
69
< div className = "flexbox dc__gap-12" >
68
70
< SecurityCard
@@ -104,7 +106,7 @@ const SecurityDetailsCards = ({ scanResult, Sidebar }: SecurityDetailsCardsProps
104
106
< div className = "flexbox-col dc__gap-12" >
105
107
< div className = "flexbox dc__content-space pb-8 dc__border-bottom-n1" >
106
108
< span className = "fs-13 fw-6 lh-1-5 cn-9" > Manifest Scan</ span >
107
- < ScannedByToolModal scanToolId = { scanToolId } />
109
+ < ScannedByToolModal scanToolId = { manifestScanToolId } />
108
110
</ div >
109
111
< div className = "flexbox dc__gap-12" >
110
112
< SecurityCard
0 commit comments