Skip to content

Commit 3df02f3

Browse files
authored
chore: reallocate blocked supply-chain-integrity 5 pts into security signals (IN-1250) (#4525)
Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
1 parent 636d4ce commit 3df02f3

3 files changed

Lines changed: 27 additions & 20 deletions

File tree

services/libs/tinybird/datasources/health_score_v2_repo_copy_ds.datasource

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ DESCRIPTION >
88
own published packages (via packageRepos), not an average over unrelated packages.
99
- `repoUrl` is the repository URL — the join key back to `repositories`/`repos`.
1010
- `maintainerHealthScoreV2` (0-40) — bus factor, org diversity, maintainer responsiveness.
11-
- `securitySupplyChainScoreV2` (0-35) — open vulnerabilities, OpenSSF Scorecard, security practices,
12-
dependency health (checked against the repo's own published packages' dependencies, not an average
13-
across unrelated packages), supply chain integrity (hardcoded 0 — provenance/2FA data not yet piped).
11+
- `securitySupplyChainScoreV2` (0-35) — open vulnerabilities (12), OpenSSF Scorecard (8), security
12+
practices (8), dependency health (7, checked against the repo's own published packages' dependencies,
13+
not an average across unrelated packages). Supply chain integrity weight reallocated into these four
14+
signals (IN-1250); provenance/2FA data not yet piped.
1415
- `developmentActivityScoreV2` (0-25) — release cadence, commit activity, issue resolution, PR merge health.
1516
- `healthScoreV2` (0-100) — weighted rescale of available categories: SUM(available subtotals) * (100 / SUM(available weights)), clamped to 100. NULL when fewer than 2 of the 3 categories are available. Does not equal the arithmetic sum of the three subtotals.
1617
- `lifecycleLabelV2` — per-repo lifecycle state (active/stable/declining/inert/abandoned/archived),

services/libs/tinybird/datasources/health_score_v2_security_ds.datasource

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ DESCRIPTION >
55
- `securitySupplyChainScoreV2` — NULL when covered sub-signal weight is <40% of the 35pt max
66
(spec Layer 1 graceful degradation), otherwise the rescaled 0-35 score.
77
- `openVulnScore`/`scorecardScorePts`/`securityPracticesScore`/`dependencyHealthScore` (IN-1212)
8-
are the raw per-signal sub-scores before rescaling, as computed in `health_score_v2_security.pipe`.
8+
are the raw per-signal sub-scores before rescaling (openVuln 0-10, scorecard 0-7, practices 0-7,
9+
deps 0-5); scaled to the new weights (12/8/8/7) inside rawScore in the pipe (IN-1250).
910
- `scorecardAvailable`/`securityPracticesAvailable`/`dependencyHealthAvailable` (IN-1212) and
1011
`openVulnAvailable` (IN-1241) are the Layer 1 coverage flags — 0 means the signal was `blocked`
1112
(no data), not scored 0. `openVulnAvailable` is 0 when the repo has never completed a

services/libs/tinybird/pipes/health_score_v2_security.pipe

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
DESCRIPTION >
2-
Security & Supply Chain category (max 35 pts): open vulnerabilities (10, blocked when the repo
2+
Security & Supply Chain category (max 35 pts): open vulnerabilities (12, blocked when the repo
33
has never completed a vulnerability scan — see vulnerability_scans — so "0 open vulns" isn't
4-
conflated with "never scanned"), OpenSSF Scorecard (7,
4+
conflated with "never scanned"), OpenSSF Scorecard (8,
55
blocked for repos with no repos-table row — effectively non-GitHub hosts), security practices
6-
(spec max 8, but capped here at 7 achievable — the spec's 6th bullet, security_contact_email,
7-
has no corresponding column anywhere in our GitHub enrichment data, so it's permanently omitted
8-
like Supply Chain Integrity below; blocked entirely when repos-table row missing), dependency
9-
health (5, blocked when the repo has no published packages so vulnerability exposure is unknown),
10-
supply chain integrity (5, permanently blocked — hardcoded per spec, provenance/2FA data not yet
11-
in the pipeline). Graceful degradation (spec Layer 1+2): category_subtotal =
6+
(8, blocked when repos-table row is missing; security_contact_email has no column in GitHub
7+
enrichment data so the sub-score is capped at 7 internally, scaled to 8 at aggregation via
8+
`* 8.0/7`; if email is ever added, remove that factor and use the raw score directly),
9+
dependency health (7, blocked when the repo has no published packages so vulnerability exposure
10+
is unknown). Graceful degradation (spec Layer 1+2): category_subtotal =
1211
SUM(available_sub_scores) * (35 / SUM(available_sub_max_weights)); category is `unavailable`
1312
(NULL) when covered weight is <40% of 35.
1413
- Split out of health_score_v2.pipe into its own copy pipe (2026-07-22) — see
1514
health_score_v2_maintainer.pipe description for why.
1615
- Scorecard banded mapping (2026-08-27, IN-1247): raw ≥ 7 → 7 pts, ≥ 5.5 → 5, ≥ 4 → 4,
1716
≥ 2.5 → 2, else 0. Replaces the linear round(min(raw,10)×0.7) which required raw ≥ 9.3 for
1817
full points (only 0.33% of repos), calibrated to real distribution (median ≈ 4, p99 ≈ 7.9).
18+
- Supply-chain-integrity reallocation (2026-08-28, IN-1250): coveredWeight raised from 29 to 35
19+
(+6 total: 5 from the permanently-blocked supply-chain slot + 1 restoring the practices signal's
20+
nominal 8th pt, always in spec but unachievable due to missing security_contact_email column,
21+
now recovered via `* 8.0/7` scaling) distributed as openVuln +2, scorecard +1, practices +1
22+
(via 8.0/7), deps +2 → 12/8/8/7. Rescale factor is now 1.0 for fully-covered repos. Category
23+
max and Layer 2 weight unchanged.
1924

2025
NODE health_score_v2_security_calc
2126
SQL >
@@ -68,16 +73,16 @@ SQL >
6873
dependencyHealthAvailable,
6974
vulnerableDeps,
7075
(
71-
openVulnAvailable * openVulnScore
72-
+ scorecardAvailable * scorecardScorePts
73-
+ securityPracticesAvailable * securityPracticesScore
74-
+ dependencyHealthAvailable * dependencyHealthScore
76+
openVulnAvailable * openVulnScore * 1.2
77+
+ scorecardAvailable * scorecardScorePts * 8.0 / 7
78+
+ securityPracticesAvailable * securityPracticesScore * 8.0 / 7
79+
+ dependencyHealthAvailable * dependencyHealthScore * 1.4
7580
) AS rawScore,
7681
(
77-
openVulnAvailable * 10
78-
+ scorecardAvailable * 7
79-
+ securityPracticesAvailable * 7
80-
+ dependencyHealthAvailable * 5
82+
openVulnAvailable * 12
83+
+ scorecardAvailable * 8
84+
+ securityPracticesAvailable * 8
85+
+ dependencyHealthAvailable * 7
8186
) AS coveredWeight
8287
FROM
8388
(

0 commit comments

Comments
 (0)