feat(iace): expandable detail comparison in benchmark tab
Build + Deploy / build-admin-compliance (push) Successful in 1m50s
Build + Deploy / build-backend-compliance (push) Successful in 10s
Build + Deploy / build-ai-sdk (push) Successful in 41s
Build + Deploy / build-developer-portal (push) Successful in 10s
Build + Deploy / build-tts (push) Successful in 14s
Build + Deploy / build-document-crawler (push) Successful in 9s
Build + Deploy / build-dsms-gateway (push) Successful in 10s
Build + Deploy / build-dsms-node (push) Successful in 11s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 17s
CI / secret-scan (push) Has been skipped
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 2m45s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Failing after 43s
CI / test-python-backend (push) Successful in 39s
CI / test-python-document-crawler (push) Successful in 25s
CI / test-python-dsms-gateway (push) Successful in 23s
CI / validate-canonical-controls (push) Successful in 15s
Build + Deploy / trigger-orca (push) Successful in 2m29s

Backend: HazardSummary now includes description, scenario, possible_harm,
trigger_event, and mitigations[] for side-by-side comparison.

Frontend: Each matched pair row is now clickable/expandable showing
two-column detail view:
- Left (GT): hazard type, cause, zone, lifecycle phases, risk values
  (F/W/P/S->R), residual risk, measures, type (KM/TM/BI), norms, comment
- Right (Engine): name, scenario, zone, possible harm, trigger, measures

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-13 15:36:18 +02:00
parent 5e317d2f0f
commit 6940271672
4 changed files with 121 additions and 38 deletions
@@ -59,13 +59,24 @@ func CompareBenchmark(gt *GroundTruth, hazards []Hazard, mitigations []Mitigatio
return &BenchmarkResult{}
}
// Build mitigation names per hazard
mitNamesByHazard := make(map[string][]string)
for _, m := range mitigations {
mitNamesByHazard[m.HazardID.String()] = append(mitNamesByHazard[m.HazardID.String()], m.Name)
}
engineSummaries := make([]HazardSummary, len(hazards))
for i, h := range hazards {
engineSummaries[i] = HazardSummary{
ID: h.ID.String(),
Name: h.Name,
Category: h.Category,
Zone: h.HazardousZone,
ID: h.ID.String(),
Name: h.Name,
Category: h.Category,
Zone: h.HazardousZone,
Description: h.Description,
Scenario: h.Scenario,
PossibleHarm: h.PossibleHarm,
TriggerEvent: h.TriggerEvent,
Mitigations: mitNamesByHazard[h.ID.String()],
}
}
@@ -90,14 +90,19 @@ type HazardMatchPair struct {
MatchReason string `json:"match_reason"`
}
// HazardSummary is a lightweight hazard representation for benchmark results.
// HazardSummary is a hazard representation for benchmark results with detail fields.
type HazardSummary struct {
ID string `json:"id"`
Name string `json:"name"`
Category string `json:"category"`
Component string `json:"component,omitempty"`
Zone string `json:"zone,omitempty"`
RiskLevel string `json:"risk_level,omitempty"`
ID string `json:"id"`
Name string `json:"name"`
Category string `json:"category"`
Component string `json:"component,omitempty"`
Zone string `json:"zone,omitempty"`
RiskLevel string `json:"risk_level,omitempty"`
Description string `json:"description,omitempty"`
Scenario string `json:"scenario,omitempty"`
PossibleHarm string `json:"possible_harm,omitempty"`
TriggerEvent string `json:"trigger_event,omitempty"`
Mitigations []string `json:"mitigations,omitempty"`
}
// CategoryScore shows coverage per ISO 12100 hazard group.