fix(heatmap): detection rules layer uses absolute rule count, not relative max
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
Before: score = (rules/max_rules)*50 + (evaluated/rules)*50 -> everything red because relative to the 1 technique with most rules After: score = min(rules/4 * 100, 100) — absolute thresholds 0 rules = gray (not covered) 1 rule = red (25 — minimal) 2 rules = orange (50 — some) 3 rules = yellow (75 — good) 4+ rules = green (100 — well covered) Also update HeatmapLegend labels to show actual rule counts instead of meaningless percentage ranges. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -29,11 +29,11 @@ const LEGENDS: Record<
|
||||
"detection-rules": {
|
||||
label: "Detection Rules Coverage",
|
||||
colors: [
|
||||
{ color: "#d3d3d3", label: "No Rules (0)" },
|
||||
{ color: "#ff6666", label: "Few Rules (<25)" },
|
||||
{ color: "#ff9933", label: "Some Rules (25-50)" },
|
||||
{ color: "#ffff66", label: "Good Coverage (50-75)" },
|
||||
{ color: "#66ff66", label: "Full Coverage (75-100)" },
|
||||
{ color: "#d3d3d3", label: "0 rules" },
|
||||
{ color: "#ff6666", label: "1 rule" },
|
||||
{ color: "#ff9933", label: "2 rules" },
|
||||
{ color: "#ffff66", label: "3 rules" },
|
||||
{ color: "#66ff66", label: "4+ rules" },
|
||||
],
|
||||
},
|
||||
campaign: {
|
||||
|
||||
Reference in New Issue
Block a user