The first per-repo view from #957: CVEs & VEX. The target page's "Schwachstellen und VEX" card now opens with a chart. The list is one click behind it.
What changed
Dashboard (target page, "Schwachstellen und VEX" card)
Grid: one row per severity (kritisch, hoch, mittel, niedrig; "unbekannt" only when an alert has no severity) and one column per VEX status (offen = no statement, in Prüfung, betroffen, nicht betroffen, behoben). Each cell is a real <button> showing that target's count, with aria-label/title like "hoch, offen: 12". Empty cells are disabled, because they would open an empty list.
Shading: one blue hue, light to dark (#F5F6FB for 0, then #CDE2FB, #9EC5F4, #5598E7, #256ABF, #104281), with white text on the two darkest. The step is ceil(5 · count / max), so a single CVE is never shaded like none. A small legend ("wenige … viele") explains the scale. Dark mode uses its own steps from the same blues (surface up to light blue, text colour flipped), defined in both dark-theme blocks.
Tile: "Offen und noch nicht bewertet: N" is the sum of the offen column. Clicking it opens the list narrowed to offen.
Tabelle toggle: shows the same numbers as a plain <table> (caption, th scope). Non-zero counts link to the same narrowed list.
Drill-down: a click opens the existing CVE list (VexPanel) filtered to that cell, with the breadcrumb "CVEs › hoch · offen" and "← Zurück zum Diagramm".
URL state: the filter goes into the URL: /targets/{id}?cve_severity=high&cve_vex=open. Either side can be left out (the tile uses ?cve_vex=open). ?cve_vex=all opens the whole list as before.
Liste und Exporte: this button opens the unfiltered panel, including the OpenVEX, CycloneDX VEX and CSAF exports.
Texts: DE and EN in the new i18n::texts::cve_matrix module. Styles are small cve-* classes appended to the end of main.css.
CveSeverity::of(word, cvss): the advisory's word comes first (CRITICAL/HIGH/MEDIUM/MODERATE/LOW, any case). If the word is missing or not one of these, the CVSS score decides (≥9 / ≥7 / ≥4 / below). With neither, the severity is Unknown.
VexColumn::of(status): no statement → Open; each VexStatus maps to its own column. This deliberately differs from vex_docs::status_of, which exports "no statement" as under_investigation.
CveMatrix holds the counts. CveFilter::matches is used by the dashboard to narrow the list. Agent and dashboard bucket with the same code, so a cell's number and the length of its list cannot drift apart.
Agent
New handler api/handlers/cve_matrix.rs plus one route line.
Mongo find with resolved_at: null (this matches a missing field and an explicit null) and a projection on severity, cvss_score and vex.status. Bucketing happens in Rust.
Only non-empty cells are listed, rows top to bottom, columns left to right.
severity is one of critical|high|medium|low|unknown.
vex is one of open|under_investigation|affected|not_affected|fixed.
Only still-reported alerts are counted (resolved_at unset).
Scoped like GET /api/v1/targets/{id}/cves: tenant_db plus repo_id. It is a GET, so the org-role middleware lets the read-only roles in. Like /cves, it is not in KEY_SCOPES.
Files outside the new ones
components/vex_panel.rs has three small changes, so #949 can rebase easily:
one use compliance_core::cve_matrix::CveFilter;
an optional prop #[props(default)] filter: Option<CveFilter>
.filter(|a| filter.is_none_or(|f| f.matches(a))) on the row iterator
api/handlers/vex.rs is not touched. /cves did not need new query params, because the narrowing happens on the already-loaded list using the shared CveFilter.
app.rs: TargetPage gains two optional query fields, plus a Route::target(id) helper. The 4 existing Route::TargetPage { id } call sites (targets, compliance, graph explorer) now use the helper.
docs/guide/sbom.md: the new endpoint is added to the API paragraph.
Known behaviour
Resolved alerts: the grid leaves out alerts a complete scan no longer found (resolved_at set). Narrowed lists match the grid counts exactly. The unfiltered "Liste und Exporte" list is the panel as before and still shows resolved alerts.
"offen" vs. "in Prüfung" badge: the grid separates "offen" (no statement) from "in Prüfung" (an explicit statement). The list's status badge still goes through status_of and shows both as "in Prüfung". The grid's hint text says so. The badge belongs to #949's part of the UI.
Severity badge vs. row: an alert with an unusual severity word but a CVSS score (e.g. important, 8.1) sits in the "hoch" row, but its list badge reads the word only and shows "info".
After a VEX change: when you state a VEX in a narrowed list, the alert leaves that cell. The panel reloads and can show a table with only the header. Fixing that needs a bigger vex_panel.rs change, so it is left for later.
Trailing ?:Route::target(id) renders as /targets/{id}?, because the router always writes the ? of a two-argument query. This is harmless and covered by a test.
Once #949 (CVEs grouped by package) has merged, a cell click should open #949's package cards for that cell instead of the plain list, and the single CVEs from there, as #957 describes. The CveFilter passed to the CVE list is the handoff point.
compliance-corecve_matrix: 8 unit tests and 1 doctest, all pass. They cover:
severity in any case, MODERATE → mittel
the CVSS fallback, and Unknown when there is no word and no score
each VEX column, with no statement → offen
wire names round-trip
counting, total, max and unassessed
the "unbekannt" row appearing only when needed
the filter, which never passes a resolved alert
compliance-agentcve_matrix: 2 tests pass. One checks the resolved_at: null filter; the other checks that a projected row is bucketed like the alert.
compliance-dashboard (server): 131 tests pass, including the new tests for:
URL ⇄ selection
shade steps
aria labels and breadcrumb
route query round-trip
texts
compliance-agent role-gate and route tests pass.
The grid markup and CSS were rendered statically in light and dark mode and checked by eye. There was no live end-to-end run against an agent with real alerts.
The first per-repo view from #957: **CVEs & VEX**. The target page's "Schwachstellen und VEX" card now opens with a chart. The list is one click behind it.
## What changed
**Dashboard (target page, "Schwachstellen und VEX" card)**
- **Grid:** one row per severity (kritisch, hoch, mittel, niedrig; "unbekannt" only when an alert has no severity) and one column per VEX status (offen = no statement, in Prüfung, betroffen, nicht betroffen, behoben). Each cell is a real `<button>` showing that target's count, with `aria-label`/`title` like "hoch, offen: 12". Empty cells are `disabled`, because they would open an empty list.
- **Shading:** one blue hue, light to dark (`#F5F6FB` for 0, then `#CDE2FB`, `#9EC5F4`, `#5598E7`, `#256ABF`, `#104281`), with white text on the two darkest. The step is `ceil(5 · count / max)`, so a single CVE is never shaded like none. A small legend ("wenige … viele") explains the scale. Dark mode uses its own steps from the same blues (surface up to light blue, text colour flipped), defined in both dark-theme blocks.
- **Tile:** "Offen und noch nicht bewertet: N" is the sum of the *offen* column. Clicking it opens the list narrowed to `offen`.
- **Tabelle toggle:** shows the same numbers as a plain `<table>` (caption, `th scope`). Non-zero counts link to the same narrowed list.
- **Drill-down:** a click opens the existing CVE list (`VexPanel`) filtered to that cell, with the breadcrumb "CVEs › hoch · offen" and "← Zurück zum Diagramm".
- **URL state:** the filter goes into the URL: `/targets/{id}?cve_severity=high&cve_vex=open`. Either side can be left out (the tile uses `?cve_vex=open`). `?cve_vex=all` opens the whole list as before.
- **Liste und Exporte:** this button opens the unfiltered panel, including the OpenVEX, CycloneDX VEX and CSAF exports.
- **Texts:** DE and EN in the new `i18n::texts::cve_matrix` module. Styles are small `cve-*` classes appended to the end of `main.css`.
**Shared bucketing (`compliance-core/src/cve_matrix.rs`, new)**
- `CveSeverity::of(word, cvss)`: the advisory's word comes first (`CRITICAL`/`HIGH`/`MEDIUM`/`MODERATE`/`LOW`, any case). If the word is missing or not one of these, the CVSS score decides (≥9 / ≥7 / ≥4 / below). With neither, the severity is `Unknown`.
- `VexColumn::of(status)`: no statement → `Open`; each `VexStatus` maps to its own column. This deliberately differs from `vex_docs::status_of`, which exports "no statement" as `under_investigation`.
- `CveMatrix` holds the counts. `CveFilter::matches` is used by the dashboard to narrow the list. Agent and dashboard bucket with the same code, so a cell's number and the length of its list cannot drift apart.
**Agent**
- New handler `api/handlers/cve_matrix.rs` plus one route line.
- Mongo `find` with `resolved_at: null` (this matches a missing field and an explicit null) and a projection on `severity`, `cvss_score` and `vex.status`. Bucketing happens in Rust.
## API
`GET /api/v1/targets/{id}/cve-matrix`
```json
{
"data": {
"cells": [
{ "severity": "high", "vex": "open", "count": 12 },
{ "severity": "medium", "vex": "not_affected", "count": 7 }
]
},
"total": 19
}
```
- Only non-empty cells are listed, rows top to bottom, columns left to right.
- `severity` is one of `critical|high|medium|low|unknown`.
- `vex` is one of `open|under_investigation|affected|not_affected|fixed`.
- Only still-reported alerts are counted (`resolved_at` unset).
- Scoped like `GET /api/v1/targets/{id}/cves`: `tenant_db` plus `repo_id`. It is a GET, so the org-role middleware lets the read-only roles in. Like `/cves`, it is not in `KEY_SCOPES`.
## Files outside the new ones
- `components/vex_panel.rs` has three small changes, so #949 can rebase easily:
- one `use compliance_core::cve_matrix::CveFilter;`
- an optional prop `#[props(default)] filter: Option<CveFilter>`
- `.filter(|a| filter.is_none_or(|f| f.matches(a)))` on the row iterator
- `api/handlers/vex.rs` is not touched. `/cves` did not need new query params, because the narrowing happens on the already-loaded list using the shared `CveFilter`.
- `app.rs`: `TargetPage` gains two optional query fields, plus a `Route::target(id)` helper. The 4 existing `Route::TargetPage { id }` call sites (targets, compliance, graph explorer) now use the helper.
- `docs/guide/sbom.md`: the new endpoint is added to the API paragraph.
## Known behaviour
- **Resolved alerts:** the grid leaves out alerts a complete scan no longer found (`resolved_at` set). Narrowed lists match the grid counts exactly. The unfiltered "Liste und Exporte" list is the panel as before and still shows resolved alerts.
- **"offen" vs. "in Prüfung" badge:** the grid separates "offen" (no statement) from "in Prüfung" (an explicit statement). The list's status badge still goes through `status_of` and shows both as "in Prüfung". The grid's hint text says so. The badge belongs to #949's part of the UI.
- **Severity badge vs. row:** an alert with an unusual severity word but a CVSS score (e.g. `important`, 8.1) sits in the "hoch" row, but its list badge reads the word only and shows "info".
- **After a VEX change:** when you state a VEX in a narrowed list, the alert leaves that cell. The panel reloads and can show a table with only the header. Fixing that needs a bigger `vex_panel.rs` change, so it is left for later.
- **Trailing `?`:** `Route::target(id)` renders as `/targets/{id}?`, because the router always writes the `?` of a two-argument query. This is harmless and covered by a test.
## Follow-up with #949
Once #949 (CVEs grouped by package) has merged, a cell click should open #949's package cards for that cell instead of the plain list, and the single CVEs from there, as #957 describes. The `CveFilter` passed to the CVE list is the handoff point.
## How tested
- `cargo fmt --all --check`: ok
- `RUSTFLAGS="-D warnings" cargo clippy -p compliance-agent --all-targets -j8 -- -D warnings`: clean
- `RUSTFLAGS="-D warnings" cargo clippy -p compliance-dashboard --features server --no-default-features --all-targets -j8 -- -D warnings`: clean
- `RUSTFLAGS="-D warnings" cargo clippy -p compliance-dashboard --features web --no-default-features --all-targets -j8 -- -D warnings`: clean
- `RUSTFLAGS="-D warnings" cargo clippy -p compliance-core --all-targets -j8 -- -D warnings`: clean
- `compliance-core` `cve_matrix`: 8 unit tests and 1 doctest, all pass. They cover:
- severity in any case, `MODERATE` → mittel
- the CVSS fallback, and `Unknown` when there is no word and no score
- each VEX column, with no statement → offen
- wire names round-trip
- counting, total, max and unassessed
- the "unbekannt" row appearing only when needed
- the filter, which never passes a resolved alert
- `compliance-agent` `cve_matrix`: 2 tests pass. One checks the `resolved_at: null` filter; the other checks that a projected row is bucketed like the alert.
- `compliance-dashboard` (server): 131 tests pass, including the new tests for:
- URL ⇄ selection
- shade steps
- aria labels and breadcrumb
- route query round-trip
- texts
- `compliance-agent` role-gate and route tests pass.
- The grid markup and CSS were rendered statically in light and dark mode and checked by eye. **There was no live end-to-end run** against an agent with real alerts.
Part of #957
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The target's "Schwachstellen und VEX" card now opens with a grid of
severity rows against VEX-status columns (offen, in Pruefung, betroffen,
nicht betroffen, behoben), each count shaded on one blue scale and a
button into the CVE list narrowed to that cell. The choice sits in the
URL (?cve_severity=high&cve_vex=open), with a breadcrumb and a way back;
a table toggle shows the same numbers, and a tile counts the CVEs nobody
has assessed yet.
The agent counts the still-reported alerts in
GET /api/v1/targets/{id}/cve-matrix; the bucketing lives in
compliance-core so the dashboard narrows the list the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rebased onto main after #959 (CVE groups) and #966 (components view). The conflicts were resolved as follows:
compliance-core/src/lib.rs, main.css, texts.rs, app.rs: both sides added a module, a style block or a test, and all are kept.
components/vex_panel.rs: the imports are the union of both sides, and #959's grouped/single view is kept. While a grid cell's filter is set (filter: Some), the panel shows that cell's alerts as single rows (CveTable), because #959's package groups cover all open alerts, not one cell. Without a filter, it shows #959's toggle as before.
Checked locally: fmt, clippy -D warnings for compliance-core and compliance-dashboard (server and web), the dashboard lib tests (141) and the core CVE tests (16).
Rebased onto main after #959 (CVE groups) and #966 (components view). The conflicts were resolved as follows:
- `compliance-core/src/lib.rs`, `main.css`, `texts.rs`, `app.rs`: both sides added a module, a style block or a test, and all are kept.
- `components/vex_panel.rs`: the imports are the union of both sides, and #959's grouped/single view is kept. While a grid cell's filter is set (`filter: Some`), the panel shows that cell's alerts as single rows (`CveTable`), because #959's package groups cover all open alerts, not one cell. Without a filter, it shows #959's toggle as before.
Checked locally: fmt, clippy `-D warnings` for compliance-core and compliance-dashboard (server and web), the dashboard lib tests (141) and the core CVE tests (16).
sharang
merged commit 32cd11bb2f into main2026-11-10 15:16:06 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The first per-repo view from #957: CVEs & VEX. The target page's "Schwachstellen und VEX" card now opens with a chart. The list is one click behind it.
What changed
Dashboard (target page, "Schwachstellen und VEX" card)
<button>showing that target's count, witharia-label/titlelike "hoch, offen: 12". Empty cells aredisabled, because they would open an empty list.#F5F6FBfor 0, then#CDE2FB,#9EC5F4,#5598E7,#256ABF,#104281), with white text on the two darkest. The step isceil(5 · count / max), so a single CVE is never shaded like none. A small legend ("wenige … viele") explains the scale. Dark mode uses its own steps from the same blues (surface up to light blue, text colour flipped), defined in both dark-theme blocks.offen.<table>(caption,th scope). Non-zero counts link to the same narrowed list.VexPanel) filtered to that cell, with the breadcrumb "CVEs › hoch · offen" and "← Zurück zum Diagramm"./targets/{id}?cve_severity=high&cve_vex=open. Either side can be left out (the tile uses?cve_vex=open).?cve_vex=allopens the whole list as before.i18n::texts::cve_matrixmodule. Styles are smallcve-*classes appended to the end ofmain.css.Shared bucketing (
compliance-core/src/cve_matrix.rs, new)CveSeverity::of(word, cvss): the advisory's word comes first (CRITICAL/HIGH/MEDIUM/MODERATE/LOW, any case). If the word is missing or not one of these, the CVSS score decides (≥9 / ≥7 / ≥4 / below). With neither, the severity isUnknown.VexColumn::of(status): no statement →Open; eachVexStatusmaps to its own column. This deliberately differs fromvex_docs::status_of, which exports "no statement" asunder_investigation.CveMatrixholds the counts.CveFilter::matchesis used by the dashboard to narrow the list. Agent and dashboard bucket with the same code, so a cell's number and the length of its list cannot drift apart.Agent
api/handlers/cve_matrix.rsplus one route line.findwithresolved_at: null(this matches a missing field and an explicit null) and a projection onseverity,cvss_scoreandvex.status. Bucketing happens in Rust.API
GET /api/v1/targets/{id}/cve-matrixseverityis one ofcritical|high|medium|low|unknown.vexis one ofopen|under_investigation|affected|not_affected|fixed.resolved_atunset).GET /api/v1/targets/{id}/cves:tenant_dbplusrepo_id. It is a GET, so the org-role middleware lets the read-only roles in. Like/cves, it is not inKEY_SCOPES.Files outside the new ones
components/vex_panel.rshas three small changes, so #949 can rebase easily:use compliance_core::cve_matrix::CveFilter;#[props(default)] filter: Option<CveFilter>.filter(|a| filter.is_none_or(|f| f.matches(a)))on the row iteratorapi/handlers/vex.rsis not touched./cvesdid not need new query params, because the narrowing happens on the already-loaded list using the sharedCveFilter.app.rs:TargetPagegains two optional query fields, plus aRoute::target(id)helper. The 4 existingRoute::TargetPage { id }call sites (targets, compliance, graph explorer) now use the helper.docs/guide/sbom.md: the new endpoint is added to the API paragraph.Known behaviour
resolved_atset). Narrowed lists match the grid counts exactly. The unfiltered "Liste und Exporte" list is the panel as before and still shows resolved alerts.status_ofand shows both as "in Prüfung". The grid's hint text says so. The badge belongs to #949's part of the UI.important, 8.1) sits in the "hoch" row, but its list badge reads the word only and shows "info".vex_panel.rschange, so it is left for later.?:Route::target(id)renders as/targets/{id}?, because the router always writes the?of a two-argument query. This is harmless and covered by a test.Follow-up with #949
Once #949 (CVEs grouped by package) has merged, a cell click should open #949's package cards for that cell instead of the plain list, and the single CVEs from there, as #957 describes. The
CveFilterpassed to the CVE list is the handoff point.How tested
cargo fmt --all --check: okRUSTFLAGS="-D warnings" cargo clippy -p compliance-agent --all-targets -j8 -- -D warnings: cleanRUSTFLAGS="-D warnings" cargo clippy -p compliance-dashboard --features server --no-default-features --all-targets -j8 -- -D warnings: cleanRUSTFLAGS="-D warnings" cargo clippy -p compliance-dashboard --features web --no-default-features --all-targets -j8 -- -D warnings: cleanRUSTFLAGS="-D warnings" cargo clippy -p compliance-core --all-targets -j8 -- -D warnings: cleancompliance-corecve_matrix: 8 unit tests and 1 doctest, all pass. They cover:MODERATE→ mittelUnknownwhen there is no word and no scorecompliance-agentcve_matrix: 2 tests pass. One checks theresolved_at: nullfilter; the other checks that a projected row is bucketed like the alert.compliance-dashboard(server): 131 tests pass, including the new tests for:compliance-agentrole-gate and route tests pass.Part of #957
🤖 Generated with Claude Code
The target's "Schwachstellen und VEX" card now opens with a grid of severity rows against VEX-status columns (offen, in Pruefung, betroffen, nicht betroffen, behoben), each count shaded on one blue scale and a button into the CVE list narrowed to that cell. The choice sits in the URL (?cve_severity=high&cve_vex=open), with a breadcrumb and a way back; a table toggle shows the same numbers, and a tile counts the CVEs nobody has assessed yet. The agent counts the still-reported alerts in GET /api/v1/targets/{id}/cve-matrix; the bucketing lives in compliance-core so the dashboard narrows the list the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>7799a98bb4to2c71385989Rebased onto main after #959 (CVE groups) and #966 (components view). The conflicts were resolved as follows:
compliance-core/src/lib.rs,main.css,texts.rs,app.rs: both sides added a module, a style block or a test, and all are kept.components/vex_panel.rs: the imports are the union of both sides, and #959's grouped/single view is kept. While a grid cell's filter is set (filter: Some), the panel shows that cell's alerts as single rows (CveTable), because #959's package groups cover all open alerts, not one cell. Without a filter, it shows #959's toggle as before.Checked locally: fmt, clippy
-D warningsfor compliance-core and compliance-dashboard (server and web), the dashboard lib tests (141) and the core CVE tests (16).