You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create an endpoint that returns project health metrics #6250
OpenAI / Claude Opus 5.5: While building a local UI mock-up for #6251 against real Scorecard and CrOSSD results, we arrived at this API shape. It is a suggestion for whoever picks this up, not a decision.
enumclassHealthMetricCriticality { LOW, MEDIUM, HIGH, CRITICAL }
data classHealthMetric(
valadvisor:AdvisorDetails,
valname:String,
valvalue:Double,
valcriticality:HealthMetricCriticality? = null,
valreason:String? = null,
valdetails:List<String> = emptyList(),
valdocumentation:String? = null,
valdocumentationLink:String? = null
)
data classPackageHealthMetrics(
validentifier:Identifier,
valpurl:String,
// The number of metrics for each criticality, leaving out zero counts.valcriticalityCounts:Map<HealthMetricCriticality, Int>,
valmetrics:List<HealthMetric>
)
GET /runs/{runId}/health-metrics returns a paged list of PackageHealthMetrics, filtered by identifier, purl and advisors, and sorted by identifier, purl or criticalityCounts (the number of CRITICAL metrics, then HIGH, then MEDIUM). The default is -criticalityCounts.
GET /runs/{runId}/health-metrics/advisors returns the names of the advisors that reported metrics, for the advisor filter.
Why this shape:
One item per package, not one per metric as for vulnerabilities: a package has up to 22 metrics from the two advisors, which would bury each package in a flat list.
Counts per criticality, not a single highest criticality: for the 348 dependencies of express library that had metrics, 347 had at least one CRITICAL metric, mostly from Scorecard checks such as CII-Best-Practices and Fuzzing. So the highest criticality does not tell packages apart.
Gaps in the ORT model worth knowing: there is no scale and no flag saying whether a higher value is better (Scorecard uses 0 to 10, CrOSSD mixes counts and percentages), and ORT drops the overall Scorecard score as well as checks that Scorecard could not compute.
Activity
Etsija commentedon Oct 23, 2026
OpenAI / Claude Opus 5.5: While building a local UI mock-up for #6251 against real Scorecard and CrOSSD results, we arrived at this API shape. It is a suggestion for whoever picks this up, not a decision.
GET /runs/{runId}/health-metricsreturns a paged list ofPackageHealthMetrics, filtered byidentifier,purlandadvisors, and sorted byidentifier,purlorcriticalityCounts(the number ofCRITICALmetrics, thenHIGH, thenMEDIUM). The default is-criticalityCounts.GET /runs/{runId}/health-metrics/advisorsreturns the names of the advisors that reported metrics, for the advisor filter.Why this shape:
CRITICALmetric, mostly from Scorecard checks such asCII-Best-PracticesandFuzzing. So the highest criticality does not tell packages apart.Gaps in the ORT model worth knowing: there is no scale and no flag saying whether a higher value is better (Scorecard uses 0 to 10, CrOSSD mixes counts and percentages), and ORT drops the overall Scorecard score as well as checks that Scorecard could not compute.