@@ -40,24 +40,23 @@ export async function getPackage(req: Request, res: Response): Promise<void> {
4040 const scorecardScore = pkg . scorecardScore != null ? Number ( pkg . scorecardScore ) : null
4141 const mappingConfidence =
4242 pkg . repoMappingConfidence != null ? Number ( pkg . repoMappingConfidence ) : null
43- const healthScoreTotal =
44- pkg . healthScore ?? ( scorecardScore !== null ? Math . round ( scorecardScore * 10 ) : null )
43+ const healthBandScore = pkg . healthScore !== null ? pkg . healthScore / 10 : scorecardScore
4544
4645 ok ( res , {
4746 purl : pkg . purl ,
4847 name : pkg . name ,
4948 ecosystem : pkg . ecosystem ,
5049 latestVersion : pkg . latestVersion ?? null ,
5150 general : {
52- healthScore : healthScoreTotal ,
51+ healthScore : pkg . healthScore ,
5352 healthScoreDetails : {
54- total : healthScoreTotal ,
53+ total : pkg . healthScore ,
5554 label : pkg . healthLabel ,
5655 maintainerHealth : pkg . maintainerHealthScore ,
5756 securitySupplyChain : pkg . securitySupplyChainScore ,
5857 developmentActivity : pkg . developmentActivityScore ,
5958 } ,
60- healthBand : computeHealthBand ( scorecardScore ) ,
59+ healthBand : computeHealthBand ( healthBandScore ) ,
6160 impact : {
6261 impactScore :
6362 pkg . criticalityScore != null ? Math . round ( Number ( pkg . criticalityScore ) * 100 ) : null ,
@@ -67,7 +66,7 @@ export async function getPackage(req: Request, res: Response): Promise<void> {
6766 transitiveReach : pkg . transitiveReach ,
6867 } ,
6968 riskSignals : {
70- lifecycle : pkg . lifecycleLabel ?? null ,
69+ lifecycle : pkg . lifecycleLabel ,
7170 maintainerBusFactor : pkg . maintainerCount ,
7271 lastRelease : pkg . latestReleaseAt ? pkg . latestReleaseAt . toISOString ( ) : null ,
7372 hasSecurityFile : pkg . hasSecurityFile ,
@@ -76,7 +75,7 @@ export async function getPackage(req: Request, res: Response): Promise<void> {
7675 openSSFScorecard : scorecardScore ,
7776 } ,
7877 } ,
79- signalCoverageHealth : pkg . signalCoverageHealth ?? null ,
78+ signalCoverageHealth : pkg . signalCoverageHealth ,
8079 assessment : null ,
8180 security : {
8281 securityContacts : null ,
0 commit comments