fix: replace linear OpenSSF Scorecard map with banded mapping (IN-1247) - #4520
Conversation
PR SummaryMedium Risk Overview Bands: raw ≥ 7 → 7 pts, ≥ 5.5 → 5, ≥ 4 → 4, ≥ 2.5 → 2, else 0. The 7-point weight, Pipe description documents the calibration rationale (IN-1247). Expect more repos at max Scorecard contribution and slightly higher mean security scores until related datasources are replayed post-merge. Reviewed by Cursor Bugbot for commit 5f3bc43. Bugbot is set up for automated code reviews on this repo. Configure here. |
867ac00 to
ebb5ce5
Compare
There was a problem hiding this comment.
Pull request overview
Recalibrates OpenSSF Scorecard scoring to reflect observed score distributions.
Changes:
- Replaces linear scoring with threshold bands.
- Documents the new mapping and rationale.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
services/libs/tinybird/pipes/health_score_v2_security.pipe:95
- This changes the scoring methodology, but this pipe and the final
health_score_v2.pipeoutput still label results asmethodologyVersion = '2.0.0'. After the planned replay, scores produced by the old and new mappings are indistinguishable, while raw snapshots are also keyed by that version. Please bump the methodology version consistently across the category, aggregate/signal-detail, and raw-snapshot producers (for example, to2.0.1).
multiIf(
ebb5ce5 to
5e16494
Compare
5e16494 to
b007848
Compare
b007848 to
f17e0fa
Compare
f17e0fa to
d4ee3e4
Compare
Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
d4ee3e4 to
5f3bc43
Compare
Summary
round(min(raw, 10) × 0.7)with a banded mapping calibrated to the real raw score distribution (median ≈ 4, p99 ≈ 7.9)scorecardAvailablegate unchanged; no schema changes downstreamEffect: repos reaching full Scorecard points 41 → ~889; mean security score among scored repos 21.1 → 21.5. Project-level impact grows as scan coverage (~25% of LF repos) improves.
Out of scope: legacy
ossPackages_enriched.pipev1 linear mapping — left for v1 deprecation; public-API× 10scale mappings inopenapi.yamlfiles (different scale, unrelated).Post-merge: replay
health_score_v2_security_ds,health_score_v2_signal_detail_ds, andproject_insights_health_breakdown_ds.Closes IN-1247