← Back to Pull requests

fix(findings): the CVSS band labels a scored finding (main hotfix) #525

Closed
unknown closed this pull request without merging on Nov 20, 2026 15:48 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 21:53 UTC
Author

Hotfix to main — CVSS severity label

A finding scored 9.6 rendered medium: effective_severity preferred a judgement's word (an LLM triage rating) over the score and never consulted the vector.

flowchart LR
  O[occurrence] -->|vector parses| B[CVSS band · computed]
  O -->|no vector| J{judgement?}
  J -->|yes| JR[re-rating · judgement]
  J -->|no| S[scanner word · scanner]

What this carries (port, not a cherry-pick)

main is 252 commits behind development and has none of development's CVSS stack, so this is a port of #519's ordering only:

| From | Carried |
|---|---|
| #519 (69a0bcd9) | severity_label ordering in rating.py; SeverityBasis; census reads carry cvss_vector so stored builds band like the views |
| #514 (c13dbb26) | cvss==3.6 pin + its import guards (test_architecture, test_layering) |
| new | models/cvss.py with severity_of alone — a strict, text-identical subset of development's module |
| def8fbf9 (cherry-pick -x) | one-line test fix: main's test_order_query parametrizes on a random UUID, so xdist workers collect different tests and make test / the pre-push hook fail on main today. Development already carries it. |

Deliberately left on development

  • the view's cvss provenance block — needs contracts#181 (and the SDK/SCI/console follow-ons)

  • intake's stated-score refusal, advisory-source scoring (#490), the 4.0 fallback (#522)

  • no schema, migration, or contracts pin change
  • Merge-back

    When main merges into development: models/cvss.py is an add/add conflict — take development's; everything else is already identical on development.

    Verification

  • make lint clean; 13,785 passed. The defect regression (test_a_scored_finding_labels_from_its_band_over_a_judgement) fails on main without the fix.
  • Tracked: traust-foundry/plans/stable-platform/bugs/2026-11-cvss-severity-label-hotfix.md

    Diff: 239 lines (+179 / -60) across 2 files Reviewer: chubirka Review duration: 1074m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 239 lines diff across 2 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.328
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #525"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.7% · Safe to merge
    16.7%