@@ -95,18 +95,27 @@ const components = Array.from(sboms.values()).map((c: SbomEntry) => {
9595});
9696
9797// Build vulnerability reports aligned with components
98- interface VulnReport { component: string ; version: string ; status: ' ok' | ' issues' ; severity: string ; cves: string []; action: string }
98+ interface VulnReport { component: string ; version: string ; status: ' ok' | ' issues' | ' ignores ' ; severity: string ; cves: string []; action: string }
9999const vulnReports: VulnReport [] = components .map ((c ) => {
100100 const adv = advisories .get (` ${c .name }@${c .version } ` );
101101 const vulns = adv ?.vulns || [];
102- if (vulns .length === 0 ) {
102+ const ignores = adv ?.ignores || [];
103+
104+ const hasVulns = vulns .length !== 0 ;
105+ const hasIgnores = ignores .length !== 0 ;
106+
107+ if (! hasVulns && ! hasIgnores ) {
103108 return { component: c .name , version: c .version , status: ' ok' , severity: ' None' , cves: [], action: ' —' };
104109 }
105- const highest = pickHighestSeverity (vulns .map ((v : Vulnerability ) => v .Severity || ' unknown' ));
106- // Normalize label case
110+
111+ const highestVulnSeverity = pickHighestSeverity (vulns .map ((v : Vulnerability ) => v .Severity || ' unknown' ));
112+ const highestIgnoreSeverity = pickHighestSeverity (ignores .map ((ignore : ExperimentalModifiedFinding ) => ignore .Finding ?.Severity || ' unknown' )); // Normalize label case
113+ const highest = pickHighestSeverity ([highestVulnSeverity , highestIgnoreSeverity ]);
114+
107115 const severityLabel = highest .charAt (0 ).toUpperCase () + highest .slice (1 );
108116 const cves = vulns .map ((v : Vulnerability ) => v .VulnerabilityID ).filter (Boolean ).slice (0 , 5 ) as string [];
109- return { component: c .name , version: c .version , status: ' issues' , severity: severityLabel , cves , action: ' —' };
117+
118+ return { component: c .name , version: c .version , status: hasVulns ? ' issues' : ' ignores' , severity: severityLabel , cves , action: ' —' };
110119});
111120
112121// Note: table shows per-component status; page-level aggregate not used currently.
@@ -199,7 +208,7 @@ const tags = [
199208 const vulns = adv ?.vulns || [];
200209 const ignores = adv ?.ignores || [];
201210
202- const hasVulns = report && report . status !== ' ok ' ;
211+ const hasVulns = vulns . length !== 0 ;
203212 const hasIgnores = ignores .length !== 0 ;
204213 const detailsId = ` details-${index } ` ;
205214
@@ -233,7 +242,7 @@ const tags = [
233242 )}
234243 </td >
235244 <td ><span class = { ` badge ${badgeClass } ` } >{ statusLabel } </span ></td >
236- <td >{ hasVulns ? (c .status || ' Patch in progress' ) : ' —' } </td >
245+ <td >{ hasVulns ? (c .status || ' Patch in progress' ) : hasIgnores ? ' Awaiting upstream patch ' : ' —' } </td >
237246 </tr >
238247 { (hasVulns || hasIgnores ) && (
239248 <>
@@ -295,11 +304,11 @@ const tags = [
295304 <tr id = { ` ${detailsId }-ignores ` } class = " vuln-details" style = " display: none;" >
296305 <td colspan = " 6" >
297306 <div class = " vuln-details-content ignored" >
298- <h4 >Ignored Vulnerability Details</h4 >
307+ <h4 >Upstream Vulnerability Details</h4 >
299308 <div class = " vuln-list" >
300309 { (() => {
301310 if (ignores .length === 0 ) {
302- return <p >Ignored vulnerabilities detected but no specific details available.</p >;
311+ return <p >Upstream vulnerabilities detected but no specific details available.</p >;
303312 }
304313
305314 return (
@@ -335,15 +344,15 @@ const tags = [
335344 )}
336345 { ignore .Statement && (
337346 <div class = " ignore-statement" >
338- <strong >Ignore Reason :</strong > { ignore .Statement }
347+ <strong >Explanation :</strong > { ignore .Statement }
339348 </div >
340349 )}
341350 </div >
342351 );
343352 })}
344353 { ignores .length > 10 && (
345354 <div class = " vuln-more" >
346- ... and { ignores .length - 10 } more ignored vulnerabilities
355+ ... and { ignores .length - 10 } more upstream vulnerabilities
347356 </div >
348357 )}
349358 </div >
0 commit comments