Commit eb10999
committed
fix(vuln-list): popola colonne risk_score, risk_tier, sla_*, real trend column
#65 — colonne /vulnerabilities team/risk/sla vuote:
La SELECT di list_vulnerabilities (handlers/vulnerability.rs) NON
includeva risk_score, risk_tier, sla_deadline, sla_days, sla_breached.
Le colonne esistono in DB (popolate da trigger_auto_risk_score + SLA
policy via migrations precedenti) ma il backend non le serializzava
mai → la UI mostrava sempre "—".
- handlers/vulnerability.rs: aggiunte alle SELECT di list e get
(singolo) + ai blocchi RETURNING di create_vulnerability,
update_vulnerability, assign_to_team, assign_to_user,
get_my_assigned_vulnerabilities, bulk_assign/update (con cast
NULL per i RETURNING che non leggono dalla tabella).
- models/vulnerability.rs: aggiunti i 5 campi a struct Vulnerability
come Option<T> con #[serde(skip_serializing_if = ...)] per
retro-compatibilita' col FE.
#66 — colonna 'trend' fasulla:
Lo Sparkline usava Math.random + sin per simulare uno storico mai
esistito. Sostituito con trend basato su DATI REALI gia presenti
nel payload:
- reopen_count > 0 → "Reopened N×" (rosso, freccia ↑)
post-remediation fallita
- status === 'resolved' → "Resolved" (verde, ↓)
- status === 'in_progress' → "In progress" (blu, →)
- default → "Stable" (grigio, —)
Niente piu' time-series simulate: il trend riflette adesso lo stato
reale del workflow di remediation della singola vuln. Quando avremo
uno storico per-vuln (es. risk_score_history table futura) potremo
tornare a uno sparkline con dati veri.1 parent 49ce6b9 commit eb10999
3 files changed
Lines changed: 109 additions & 13 deletions
File tree
- vulnerability-manager-frontend/src/pages
- vulnerability-manager/src
- handlers
- models
Lines changed: 38 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
427 | 427 | | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
433 | 465 | | |
434 | 466 | | |
435 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
190 | 198 | | |
191 | 199 | | |
192 | 200 | | |
| |||
235 | 243 | | |
236 | 244 | | |
237 | 245 | | |
238 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
239 | 253 | | |
240 | 254 | | |
241 | 255 | | |
| |||
283 | 297 | | |
284 | 298 | | |
285 | 299 | | |
286 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
287 | 307 | | |
288 | 308 | | |
289 | 309 | | |
| |||
338 | 358 | | |
339 | 359 | | |
340 | 360 | | |
341 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
342 | 368 | | |
343 | 369 | | |
344 | 370 | | |
| |||
402 | 428 | | |
403 | 429 | | |
404 | 430 | | |
405 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
406 | 438 | | |
407 | 439 | | |
408 | 440 | | |
| |||
502 | 534 | | |
503 | 535 | | |
504 | 536 | | |
505 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
506 | 544 | | |
507 | 545 | | |
508 | 546 | | |
| |||
763 | 801 | | |
764 | 802 | | |
765 | 803 | | |
766 | | - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
767 | 811 | | |
768 | 812 | | |
769 | 813 | | |
| |||
916 | 960 | | |
917 | 961 | | |
918 | 962 | | |
919 | | - | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
920 | 970 | | |
921 | 971 | | |
922 | 972 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
124 | 138 | | |
125 | 139 | | |
126 | 140 | | |
| |||
0 commit comments