Skip to content

feat: redesign vulnerability detail page with merged info and source tabs - #40

Merged
kato83 merged 19 commits into
mainfrom
feature/vuln-detail-redesign
Jul 25, 2026
Merged

feat: redesign vulnerability detail page with merged info and source tabs#40
kato83 merged 19 commits into
mainfrom
feature/vuln-detail-redesign

Conversation

@kato83

@kato83 kato83 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

This pull request was created by @kiro-agent on behalf of @kato83 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro Web


Summary

Redesigns the vulnerability detail page to merge information from multiple sources (NVD, OSV, MITRE) at the top of the page and provide source-specific tabs at the bottom for detailed inspection.

Changes

Backend (Go)

  • CVSS Score/Severity Computation: Added cvss.BaseSeverity(score, vector) function that returns severity labels (CRITICAL/HIGH/MEDIUM/LOW/NONE) based on CVSS version-specific thresholds
  • Extended model.Severity struct with BaseScore *float64 and BaseSeverity string fields
  • In store/detail.go: computes score/severity from vector strings for OSV severity entries and fills missing values for MITRE metrics using the existing cvss.BaseScore() function
  • 31 table-driven test cases for BaseSeverity covering all CVSS v2/v3.x/v4.0 boundary values

Frontend (Angular)

  • Top section (merged info): Header (ID, summary, severity badge), Merged CVSS Scores card (highest + all individual scores with source labels), Risk Indicators (EPSS, KEV, LEV), Affected Packages
  • Bottom section (source tabs): Tabbed interface with dynamic tabs (OSV/NVD/MITRE) shown only when data exists
  • Proper ARIA attributes for accessibility (role=tablist, role=tab, aria-selected, role=tabpanel)
  • Signal-based state management with computed signals for merged data

i18n

  • 7 new translation IDs added with Japanese translations
  • Build succeeds with no translation warnings

Testing

  • Go build: pass (all packages)
  • Go tests: pass (18 packages)
  • UI build: pass (no warnings)
  • UI tests: pass (132 tests, 13 test files)

kiro-agent and others added 12 commits July 25, 2026 12:09
- Add BaseSeverity() function to cvss package that returns severity labels
  (NONE/LOW/MEDIUM/HIGH/CRITICAL) based on score and CVSS version thresholds
- Add comprehensive table-driven tests for BaseSeverity covering v2, v3.x,
  v4.0 boundary values and empty vector fallback
- Extend model.Severity struct with computed BaseScore and BaseSeverity fields
- Compute base_score/base_severity for OSV Severity entries in buildBaseDetail
- Fill missing base_score/base_severity for MITRE metrics from vector_string

Co-authored-by: kato83 <24907348+kato83@users.noreply.github.com>
Co-authored-by: kato83 <24907348+kato83@users.noreply.github.com>
…source tabs

- Add base_score and base_severity optional fields to Severity interface
- Rewrite component with top section (merged CVSS scores, risk indicators,
  affected packages) and bottom section (tabbed OSV/NVD/MITRE views)
- Add computed signals: highestCvssScore, allCvssScores, availableTabs
- Implement tab switching via activeTab signal with ARIA attributes
- Extract template to separate HTML file for maintainability
- Add i18n with @@ IDs for all new text (mergedScores, riskIndicators,
  tabOsv, tabNvd, tabMitre, highestScore, source)
- Update tests for new tabbed layout including tab switching

Co-authored-by: kato83 <24907348+kato83@users.noreply.github.com>
Co-authored-by: kato83 <24907348+kato83@users.noreply.github.com>
Co-authored-by: kato83 <24907348+kato83@users.noreply.github.com>
Co-authored-by: kato83 <24907348+kato83@users.noreply.github.com>
Co-authored-by: kato83 <24907348+kato83@users.noreply.github.com>
- Rename CVSS Scores panel heading to 'Severity' (深刻度)
  to accommodate non-CVSS scoring systems (e.g., Drupal NISTIR 7864)
- Display CVSS vector string under each score entry when available
  (OSV severity.score, NVD vector_string, MITRE vector_string)
- Expand KEV section in Risk Indicators card to show full details:
  vulnerability_name, vendor/product, date_added, due_date,
  ransomware campaign use, and required_action
- Update i18n translations accordingly
- Add 'EPSS', 'CISA KEV', 'LEV' source labels above each indicator
  in the Risk Indicators card for clarity
- Show EPSS score_date below the percentile
- Keep KEV indicator in Risk card as compact summary (In KEV + vendor)
- Move KEV full detail (vulnerability_name, dates, ransomware,
  required_action) into a separate panel with grid layout
- Update i18n translations
- Show severity_worst–severity_best range in header card (matching list view)
- Merge score into severity badge: 'CRITICAL: 9.8' instead of separate elements
- Add formatScoringVersion() to display human-readable versions:
  v31 → 'CVSS v3.1', v40 → 'CVSS v4.0', CVSS_V3 → 'CVSS v3.1', etc.
Grid items stretch to equal height (default), while inner content
is vertically centered using flex-col + justify-center.
kato83 added 7 commits July 26, 2026 02:02
- OSV tab: display published, modified, and withdrawn dates
- NVD tab: display published, last_modified, and vuln_status in grid
- MITRE tab: reorganize to show published, updated, state, assigner
  in a consistent grid layout (state moved from badge to grid item)
- Add i18n translations for new keys
Backend:
- Add NVDConfigurationDetail and NVDCPEMatchDetail to model
- Add fetchNVDConfigurations() to query nvd_configurations and
  nvd_cpe_matches tables and return CPE match criteria

Frontend:
- Add NVDConfigurationDetail/NVDCPEMatchDetail TypeScript interfaces
- Display 'Affected Software (CPE)' section in NVD tab showing
  CPE criteria with version ranges
- Add i18n translations
Instead of hiding the KEV indicator when a vulnerability is not in the
CISA KEV catalog, display a greyed-out panel with 'KEV登録なし' text
to make the absence of KEV listing explicit.
Backend:
- Add GET /api/v1/vulnerabilities/{id}/epss-history endpoint
- Add GetEPSSHistory() to store interface and PostgresStore
- Returns full EPSS score history ordered by date

Frontend:
- Add chart.js 4.5.1 dependency
- Create EpssChartComponent (standalone, line chart with area fill)
- Integrate into vulnerability detail page below Risk Indicators
- Chart displays when 2+ data points are available
- Auto-hides point markers when >60 data points for readability
Detect dark mode via document.documentElement.classList and apply
lighter tick/grid colors for readability on dark backgrounds.
Backend:
- Include raw_json from osv_entries, nvd_entries, mitre_entries
  in the vulnerability detail API response

Frontend:
- Add formatRawJson() helper (JSON.stringify with 2-space indent)
- Add <details><summary>Raw JSON</summary> section at the bottom
  of each source tab (OSV, NVD, MITRE)
- Styled with max-height scroll, monospace font, dark mode support
@kato83
kato83 merged commit a6901b8 into main Jul 25, 2026
3 checks passed
@kato83
kato83 deleted the feature/vuln-detail-redesign branch July 25, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants