Skip to content

Commit 6d4be3a

Browse files
authored
New Pillars Addition Infrastructure, SecOps and AI (#1099)
1 parent 3d7ed5d commit 6d4be3a

10 files changed

Lines changed: 205 additions & 41 deletions

File tree

src/powershell/assets/ReportTemplate.html

Lines changed: 28 additions & 28 deletions
Large diffs are not rendered by default.

src/powershell/private/core/Get-ZtAssessmentResults.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ function Get-ZtAssessmentResults {
5454
}
5555

5656
if($PreviewEnabled){
57-
# $summary | Add-Member -NotePropertyName 'NetworkPassed' -NotePropertyValue (@($TestResults).Where{ $_.TestPillar -eq 'Network' -and $_.TestStatus -eq 'Passed' }.Count)
58-
# $summary | Add-Member -NotePropertyName 'NetworkTotal' -NotePropertyValue (@($TestResults).Where{ $_.TestPillar -eq 'Network' -and $_.TestStatus -notin 'Skipped', 'Planned' }.Count)
59-
# $summary | Add-Member -NotePropertyName 'DataPassed' -NotePropertyValue (@($TestResults).Where{ $_.TestPillar -eq 'Data' -and $_.TestStatus -eq 'Passed' }.Count)
60-
# $summary | Add-Member -NotePropertyName 'DataTotal' -NotePropertyValue (@($TestResults).Where{ $_.TestPillar -eq 'Data' -and $_.TestStatus -notin 'Skipped', 'Planned' }.Count)
57+
$summary | Add-Member -NotePropertyName 'InfrastructurePassed' -NotePropertyValue (@($TestResults).Where{ $_.TestPillar -eq 'Infrastructure' -and $_.TestStatus -eq 'Passed' }.Count)
58+
$summary | Add-Member -NotePropertyName 'InfrastructureTotal' -NotePropertyValue (@($TestResults).Where{ $_.TestPillar -eq 'Infrastructure' -and $_.TestStatus -notin 'Skipped', 'Planned' }.Count)
59+
$summary | Add-Member -NotePropertyName 'SecOpsPassed' -NotePropertyValue (@($TestResults).Where{ $_.TestPillar -eq 'SecOps' -and $_.TestStatus -eq 'Passed' }.Count)
60+
$summary | Add-Member -NotePropertyName 'SecOpsTotal' -NotePropertyValue (@($TestResults).Where{ $_.TestPillar -eq 'SecOps' -and $_.TestStatus -notin 'Skipped', 'Planned' }.Count)
61+
$summary | Add-Member -NotePropertyName 'AIPassed' -NotePropertyValue (@($TestResults).Where{ $_.TestPillar -eq 'AI' -and $_.TestStatus -eq 'Passed' }.Count)
62+
$summary | Add-Member -NotePropertyName 'AITotal' -NotePropertyValue (@($TestResults).Where{ $_.TestPillar -eq 'AI' -and $_.TestStatus -notin 'Skipped', 'Planned' }.Count)
6163
}
6264

6365
return $summary

src/powershell/public/Invoke-ZtAssessment.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function Invoke-ZtAssessment {
154154

155155
[PsfArgumentCompleter('ZeroTrustAssessment.Tests.Pillar')]
156156
# The Zero Trust pillar to assess. Defaults to All.
157-
[ValidateSet('All', 'Identity', 'Devices', 'Network', 'Data')]
157+
[ValidateSet('All', 'Identity', 'Devices', 'Network', 'Data', 'Infrastructure', 'SecOps', 'AI')]
158158
[string]
159159
$Pillar = 'All',
160160

src/report/src/Router.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import Apps from "./pages/Apps";
1010
import Network from "./pages/Network";
1111
import Infrastructure from "./pages/Infrastructure";
1212
import Data from "./pages/Data";
13+
import SecOps from "./pages/SecOps";
14+
import AI from "./pages/AI";
1315

1416
export const router = createHashRouter([
1517
{
@@ -44,6 +46,14 @@ export const router = createHashRouter([
4446
path: "data",
4547
element: <Data />,
4648
},
49+
{
50+
path: "secops",
51+
element: <SecOps />,
52+
},
53+
{
54+
path: "ai",
55+
element: <AI />,
56+
},
4757
],
4858
},
4959
{

src/report/src/config/menu.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,25 @@ const allMenuItems: NavItemWithChildren[] = [
3636
title: 'Network',
3737
to: 'network',
3838
},
39-
// {
40-
// title: 'Infrastructure',
41-
// to: 'infrastructure',
42-
// },
39+
{
40+
title: 'Infrastructure',
41+
to: 'infrastructure',
42+
},
4343
{
4444
title: 'Data',
4545
to: 'data',
4646
},
47+
{
48+
title: 'SecOps',
49+
to: 'secops',
50+
},
51+
{
52+
title: 'AI',
53+
to: 'ai',
54+
},
4755
]
4856

49-
// Filter menu based on available data (e.g., exclude Network/Data if their totals don't exist)
57+
// Filter menu based on available data (e.g., exclude Network/Data/Infrastructure/SecOps/AI if their totals don't exist)
5058
export const mainMenu: NavItemWithChildren[] = allMenuItems.filter(item => {
5159
if (item.title === 'Network') {
5260
// Only show Network tab if NetworkTotal exists in the report data
@@ -56,6 +64,15 @@ export const mainMenu: NavItemWithChildren[] = allMenuItems.filter(item => {
5664
// Only show Data tab if DataTotal exists in the report data
5765
return reportData.TestResultSummary?.DataTotal !== undefined
5866
}
67+
if (item.title === 'Infrastructure') {
68+
return reportData.TestResultSummary?.InfrastructureTotal !== undefined
69+
}
70+
if (item.title === 'SecOps') {
71+
return reportData.TestResultSummary?.SecOpsTotal !== undefined
72+
}
73+
if (item.title === 'AI') {
74+
return reportData.TestResultSummary?.AITotal !== undefined
75+
}
5976
return true
6077
})
6178

src/report/src/config/report-data.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ export interface TestResultSummaryData {
119119
DataTotal?: number;
120120
NetworkPassed?: number;
121121
NetworkTotal?: number;
122+
InfrastructurePassed?: number;
123+
InfrastructureTotal?: number;
124+
SecOpsPassed?: number;
125+
SecOpsTotal?: number;
126+
AIPassed?: number;
127+
AITotal?: number;
122128
}
123129
export interface SankeyData {
124130
nodes: SankeyDataNode[];

src/report/src/pages/AI.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { PageHeader, PageHeaderHeading } from "@/components/page-header";
2+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
3+
import { columns } from "@/components/test-table/columns";
4+
import { DataTable } from "@/components/test-table/data-table";
5+
import { reportData } from "@/config/report-data";
6+
7+
export default function AI() {
8+
return (
9+
<>
10+
<PageHeader>
11+
<PageHeaderHeading>AI</PageHeaderHeading>
12+
</PageHeader>
13+
<Card>
14+
<CardHeader>
15+
<CardTitle className="mb-3">Assessment results</CardTitle>
16+
<CardDescription>
17+
The results presented below are based on Zero Trust security principles for AI workloads.
18+
</CardDescription>
19+
</CardHeader>
20+
<CardContent className="gap-4 px-4 pb-4 pt-1">
21+
<DataTable columns={columns} data={reportData.Tests} pillar="AI" />
22+
</CardContent>
23+
</Card>
24+
</>
25+
)
26+
}

src/report/src/pages/Dashboard.tsx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,39 @@ export default function Dashboard() {
322322
</div>
323323
</div>
324324
)}
325+
{reportData.TestResultSummary.InfrastructurePassed !== undefined && (
326+
<div className="grid flex-1 auto-rows-min gap-0.5">
327+
<div className="text-sm text-muted-foreground">Infrastructure</div>
328+
<div className="flex items-baseline gap-1 text-xl font-bold tabular-nums leading-none">
329+
{reportData.TestResultSummary.InfrastructurePassed}/{reportData.TestResultSummary.InfrastructureTotal}
330+
<span className="text-sm font-normal text-muted-foreground">
331+
tests
332+
</span>
333+
</div>
334+
</div>
335+
)}
336+
{reportData.TestResultSummary.SecOpsPassed !== undefined && (
337+
<div className="grid flex-1 auto-rows-min gap-0.5">
338+
<div className="text-sm text-muted-foreground">SecOps</div>
339+
<div className="flex items-baseline gap-1 text-xl font-bold tabular-nums leading-none">
340+
{reportData.TestResultSummary.SecOpsPassed}/{reportData.TestResultSummary.SecOpsTotal}
341+
<span className="text-sm font-normal text-muted-foreground">
342+
tests
343+
</span>
344+
</div>
345+
</div>
346+
)}
347+
{reportData.TestResultSummary.AIPassed !== undefined && (
348+
<div className="grid flex-1 auto-rows-min gap-0.5">
349+
<div className="text-sm text-muted-foreground">AI</div>
350+
<div className="flex items-baseline gap-1 text-xl font-bold tabular-nums leading-none">
351+
{reportData.TestResultSummary.AIPassed}/{reportData.TestResultSummary.AITotal}
352+
<span className="text-sm font-normal text-muted-foreground">
353+
tests
354+
</span>
355+
</div>
356+
</div>
357+
)}
325358
</div>
326359
<ChartContainer
327360
config={{
@@ -341,6 +374,18 @@ export default function Dashboard() {
341374
label: "Network",
342375
color: "hsl(var(--chart-4))",
343376
},
377+
infrastructure: {
378+
label: "Infrastructure",
379+
color: "hsl(var(--chart-5))",
380+
},
381+
secops: {
382+
label: "SecOps",
383+
color: "hsl(var(--chart-1))",
384+
},
385+
ai: {
386+
label: "AI",
387+
color: "hsl(var(--chart-2))",
388+
},
344389
}}
345390
className="mx-auto aspect-square w-full max-w-[80%]"
346391
>
@@ -352,6 +397,30 @@ export default function Dashboard() {
352397
bottom: -10,
353398
}}
354399
data={[
400+
// Only include AI pillar if it exists (preview mode)
401+
...(reportData.TestResultSummary.AIPassed !== undefined && reportData.TestResultSummary.AITotal !== undefined
402+
? [{
403+
activity: "ai",
404+
value: (reportData.TestResultSummary.AIPassed / reportData.TestResultSummary.AITotal) * 100,
405+
fill: "var(--color-ai)",
406+
}]
407+
: []),
408+
// Only include SecOps pillar if it exists (preview mode)
409+
...(reportData.TestResultSummary.SecOpsPassed !== undefined && reportData.TestResultSummary.SecOpsTotal !== undefined
410+
? [{
411+
activity: "secops",
412+
value: (reportData.TestResultSummary.SecOpsPassed / reportData.TestResultSummary.SecOpsTotal) * 100,
413+
fill: "var(--color-secops)",
414+
}]
415+
: []),
416+
// Only include Infrastructure pillar if it exists (preview mode)
417+
...(reportData.TestResultSummary.InfrastructurePassed !== undefined && reportData.TestResultSummary.InfrastructureTotal !== undefined
418+
? [{
419+
activity: "infrastructure",
420+
value: (reportData.TestResultSummary.InfrastructurePassed / reportData.TestResultSummary.InfrastructureTotal) * 100,
421+
fill: "var(--color-infrastructure)",
422+
}]
423+
: []),
355424
// Only include Network pillar if it exists (preview mode)
356425
...(reportData.TestResultSummary.NetworkPassed !== undefined && reportData.TestResultSummary.NetworkTotal !== undefined
357426
? [{

src/report/src/pages/Infrastructure.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { PageHeader, PageHeaderHeading } from "@/components/page-header";
2-
import { Card, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
2+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
3+
import { columns } from "@/components/test-table/columns";
4+
import { DataTable } from "@/components/test-table/data-table";
5+
import { reportData } from "@/config/report-data";
36

47
export default function Infrastructure() {
58
return (
@@ -9,9 +12,14 @@ export default function Infrastructure() {
912
</PageHeader>
1013
<Card>
1114
<CardHeader>
12-
<CardTitle>Coming soon</CardTitle>
13-
<CardDescription>Patience is bitter, but its fruit is sweet. -Jean-Jacques Rousseau</CardDescription>
15+
<CardTitle className="mb-3">Assessment results</CardTitle>
16+
<CardDescription>
17+
The results presented below are based on Zero Trust security principles for infrastructure.
18+
</CardDescription>
1419
</CardHeader>
20+
<CardContent className="gap-4 px-4 pb-4 pt-1">
21+
<DataTable columns={columns} data={reportData.Tests} pillar="Infrastructure" />
22+
</CardContent>
1523
</Card>
1624
</>
1725
)

src/report/src/pages/SecOps.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { PageHeader, PageHeaderHeading } from "@/components/page-header";
2+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
3+
import { columns } from "@/components/test-table/columns";
4+
import { DataTable } from "@/components/test-table/data-table";
5+
import { reportData } from "@/config/report-data";
6+
7+
export default function SecOps() {
8+
return (
9+
<>
10+
<PageHeader>
11+
<PageHeaderHeading>Security Operations</PageHeaderHeading>
12+
</PageHeader>
13+
<Card>
14+
<CardHeader>
15+
<CardTitle className="mb-3">Assessment results</CardTitle>
16+
<CardDescription>
17+
The results presented below are based on Zero Trust security principles for security operations.
18+
</CardDescription>
19+
</CardHeader>
20+
<CardContent className="gap-4 px-4 pb-4 pt-1">
21+
<DataTable columns={columns} data={reportData.Tests} pillar="SecOps" />
22+
</CardContent>
23+
</Card>
24+
</>
25+
)
26+
}

0 commit comments

Comments
 (0)