chore: simplify AttackSurface component

This commit is contained in:
Pablo Lara
2024-08-19 12:14:17 +02:00
parent f236d2087a
commit f61ed5ddf5
+5 -5
View File
@@ -5,22 +5,18 @@ import ActionCard from "../ui/action-card/ActionCard";
const cardData = [
{
findings: 3,
icon: "solar:danger-triangle-bold",
title: "Internet Exposed Resources",
},
{
findings: 15,
icon: "solar:danger-triangle-bold",
title: "Exposed Secrets",
},
{
findings: 0,
icon: "heroicons:shield-check-solid",
title: "IAM Policies Leading to Privilege Escalation",
},
{
findings: 0,
icon: "heroicons:shield-check-solid",
title: "EC2 with Metadata Service V1 (IMDSv1)",
},
];
@@ -32,7 +28,11 @@ export const AttackSurface = () => {
<ActionCard
key={index}
color={card.findings > 0 ? "fail" : "success"}
icon={card.findings > 0 ? "solar:danger-triangle-bold" : card.icon}
icon={
card.findings > 0
? "solar:danger-triangle-bold"
: "heroicons:shield-check-solid"
}
title={card.title}
description={
card.findings > 0 ? "Review Required" : "No Issues Found"