diff --git a/web/app/page.tsx b/web/app/page.tsx index 7818537..92c660d 100644 --- a/web/app/page.tsx +++ b/web/app/page.tsx @@ -15,6 +15,19 @@ import { const COLORS = ['#2563eb', '#16a34a', '#f59e0b', '#dc2626'] +const ATTACK_TACTICS = [ + 'initial-access', + 'execution', + 'persistence', + 'privilege-escalation', + 'defense-evasion', + 'credential-access', + 'discovery', + 'lateral-movement', + 'collection', + 'exfiltration' +] + export default function HomePage() { const [dashboard, setDashboard] = useState(null) @@ -40,6 +53,15 @@ export default function HomePage() { ? Object.entries(dashboard.maturity).map(([name, value]) => ({ name, value })) : [] + const tacticData = dashboard?.status || {} + + function tacticColor(value) { + if (value >= 10) return '#dc2626' + if (value >= 5) return '#f59e0b' + if (value >= 1) return '#16a34a' + return '#334155' + } + return (
+ +
+

ATT&CK Coverage Heatmap

+ +
+ {ATTACK_TACTICS.map((tactic) => { + const value = tacticData[tactic] || 0 + + return ( +
+

{tactic}

+

{value}

+
+ ) + })} +
+
) }