-
Notifications
You must be signed in to change notification settings - Fork 731
feat: add enriched fields (CM-1285) #4257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,15 +40,23 @@ export async function getPackage(req: Request, res: Response): Promise<void> { | |
| const scorecardScore = pkg.scorecardScore != null ? Number(pkg.scorecardScore) : null | ||
| const mappingConfidence = | ||
| pkg.repoMappingConfidence != null ? Number(pkg.repoMappingConfidence) : null | ||
| const healthBandScore = pkg.healthScore !== null ? pkg.healthScore / 10 : scorecardScore | ||
|
|
||
| ok(res, { | ||
| purl: pkg.purl, | ||
| name: pkg.name, | ||
| ecosystem: pkg.ecosystem, | ||
| latestVersion: pkg.latestVersion ?? null, | ||
| general: { | ||
| healthScore: scorecardScore !== null ? Math.round(scorecardScore * 10) : null, | ||
| healthBand: computeHealthBand(scorecardScore), | ||
| healthScore: pkg.healthScore, | ||
| healthScoreDetails: { | ||
| total: pkg.healthScore, | ||
| label: pkg.healthLabel, | ||
| maintainerHealth: pkg.maintainerHealthScore, | ||
| securitySupplyChain: pkg.securitySupplyChainScore, | ||
| developmentActivity: pkg.developmentActivityScore, | ||
| }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. healthScoreDetails never nullMedium Severity The handler always builds a Additional Locations (1)Reviewed by Cursor Bugbot for commit 11fa261. Configure here. |
||
| healthBand: computeHealthBand(healthBandScore), | ||
| impact: { | ||
| impactScore: | ||
| pkg.criticalityScore != null ? Math.round(Number(pkg.criticalityScore) * 100) : null, | ||
|
|
@@ -58,7 +66,7 @@ export async function getPackage(req: Request, res: Response): Promise<void> { | |
| transitiveReach: pkg.transitiveReach, | ||
| }, | ||
| riskSignals: { | ||
| lifecycle: null, | ||
| lifecycle: pkg.lifecycleLabel, | ||
| maintainerBusFactor: pkg.maintainerCount, | ||
| lastRelease: pkg.latestReleaseAt ? pkg.latestReleaseAt.toISOString() : null, | ||
| hasSecurityFile: pkg.hasSecurityFile, | ||
|
|
@@ -67,6 +75,7 @@ export async function getPackage(req: Request, res: Response): Promise<void> { | |
| openSSFScorecard: scorecardScore, | ||
| }, | ||
| }, | ||
| signalCoverageHealth: pkg.signalCoverageHealth, | ||
| assessment: null, | ||
| security: { | ||
| securityContacts: null, | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.