Skip to content

Commit 2972a94

Browse files
authored
Merge pull request #659 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents da0d221 + ed4fae1 commit 2972a94

File tree

95 files changed

+470
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+470
-91
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-ListTests.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ function Invoke-ListTests {
7979
if ($ReportFound) {
8080
$AllReportTests = $IdentityTests + $DevicesTests
8181
# Use HashSet for O(1) lookup performance
82-
$TestLookup = [System.Collections.Generic.HashSet[string]]::new([string[]]$AllReportTests)
82+
$TestLookup = [System.Collections.Generic.HashSet[string]]::new()
83+
foreach ($test in $AllReportTests) {
84+
[void]$TestLookup.Add($test)
85+
}
8386
$FilteredTests = $TestResultsData.TestResults | Where-Object { $TestLookup.Contains($_.RowKey) }
8487
$TestResultsData.TestResults = @($FilteredTests)
8588
} else {

Modules/CIPPCore/Public/Tests/ZTNA/Devices/Invoke-CippTestZTNA24540.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
function Invoke-CippTestZTNA24540 {
2+
<#
3+
.SYNOPSIS
4+
Windows Firewall policies protect against unauthorized network access
5+
#>
26
param($Tenant)
37
#Tested - Device
48
try {
59
$ConfigurationPolicies = New-CIPPDbRequest -TenantFilter $Tenant -Type 'IntuneConfigurationPolicies'
610
if (-not $ConfigurationPolicies) {
7-
Add-CippTestResult -TenantFilter $Tenant -TestId 'ZTNA24540' -TestType 'Devices' -Status 'Investigate' -ResultMarkdown 'Intune configuration policies not found in database' -Risk 'High' -Name 'Windows Firewall policies protect against unauthorized network access' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Device'
11+
Add-CippTestResult -TenantFilter $Tenant -TestId 'ZTNA24540' -TestType 'Devices' -Status 'Skipped' -ResultMarkdown 'No data found in database. This may be due to missing required licenses or data collection not yet completed.' -Risk 'High' -Name 'Windows Firewall policies protect against unauthorized network access' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Device'
812
return
913
}
1014

Modules/CIPPCore/Public/Tests/ZTNA/Devices/Invoke-CippTestZTNA24541.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
function Invoke-CippTestZTNA24541 {
2+
<#
3+
.SYNOPSIS
4+
Compliance policies protect Windows devices
5+
#>
26
param($Tenant)
37

48
$TestId = 'ZTNA24541'
@@ -7,7 +11,7 @@ function Invoke-CippTestZTNA24541 {
711
$IntunePolicies = New-CIPPDbRequest -TenantFilter $Tenant -Type 'IntuneDeviceCompliancePolicies'
812

913
if (-not $IntunePolicies) {
10-
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Investigate' -ResultMarkdown 'Intune policies not found in database' -Risk 'High' -Name 'Compliance policies protect Windows devices' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Tenant'
14+
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Skipped' -ResultMarkdown 'No data found in database. This may be due to missing required licenses or data collection not yet completed.' -Risk 'High' -Name 'Compliance policies protect Windows devices' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Tenant'
1115
return
1216
}
1317

Modules/CIPPCore/Public/Tests/ZTNA/Devices/Invoke-CippTestZTNA24542.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
function Invoke-CippTestZTNA24542 {
2+
<#
3+
.SYNOPSIS
4+
Compliance policies protect macOS devices
5+
#>
26
param($Tenant)
37

48
$TestId = 'ZTNA24542'
@@ -7,7 +11,7 @@ function Invoke-CippTestZTNA24542 {
711
$IntunePolicies = New-CIPPDbRequest -TenantFilter $Tenant -Type 'IntuneDeviceCompliancePolicies'
812

913
if (-not $IntunePolicies) {
10-
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Investigate' -ResultMarkdown 'Intune policies not found in database' -Risk 'High' -Name 'Compliance policies protect macOS devices' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Tenant'
14+
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Skipped' -ResultMarkdown 'No data found in database. This may be due to missing required licenses or data collection not yet completed.' -Risk 'High' -Name 'Compliance policies protect macOS devices' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Tenant'
1115
return
1216
}
1317

Modules/CIPPCore/Public/Tests/ZTNA/Devices/Invoke-CippTestZTNA24543.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
function Invoke-CippTestZTNA24543 {
2+
<#
3+
.SYNOPSIS
4+
Compliance policies protect iOS/iPadOS devices
5+
#>
26
param($Tenant)
37

48
$TestId = 'ZTNA24543'
@@ -8,7 +12,7 @@ function Invoke-CippTestZTNA24543 {
812
$IntunePolicies = New-CIPPDbRequest -TenantFilter $Tenant -Type 'IntuneDeviceCompliancePolicies'
913

1014
if (-not $IntunePolicies) {
11-
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Investigate' -ResultMarkdown 'Intune policies not found in database' -Risk 'High' -Name 'Compliance policies protect iOS/iPadOS devices' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Tenant'
15+
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Skipped' -ResultMarkdown 'No data found in database. This may be due to missing required licenses or data collection not yet completed.' -Risk 'High' -Name 'Compliance policies protect iOS/iPadOS devices' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Tenant'
1216
return
1317
}
1418

Modules/CIPPCore/Public/Tests/ZTNA/Devices/Invoke-CippTestZTNA24545.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
function Invoke-CippTestZTNA24545 {
2+
<#
3+
.SYNOPSIS
4+
Compliance policies protect fully managed and corporate-owned Android devices
5+
#>
26
param($Tenant)
37

48
$TestId = 'ZTNA24545'
@@ -8,7 +12,7 @@ function Invoke-CippTestZTNA24545 {
812
$IntunePolicies = New-CIPPDbRequest -TenantFilter $Tenant -Type 'IntuneDeviceCompliancePolicies'
913

1014
if (-not $IntunePolicies) {
11-
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Investigate' -ResultMarkdown 'Intune policies not found in database' -Risk 'High' -Name 'Compliance policies protect fully managed and corporate-owned Android devices' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Tenant'
15+
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Skipped' -ResultMarkdown 'No data found in database. This may be due to missing required licenses or data collection not yet completed.' -Risk 'High' -Name 'Compliance policies protect fully managed and corporate-owned Android devices' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Tenant'
1216
return
1317
}
1418

Modules/CIPPCore/Public/Tests/ZTNA/Devices/Invoke-CippTestZTNA24547.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
function Invoke-CippTestZTNA24547 {
2+
<#
3+
.SYNOPSIS
4+
Compliance policies protect personally owned Android devices
5+
#>
26
param($Tenant)
37

48
$TestId = 'ZTNA24547'
@@ -8,7 +12,7 @@ function Invoke-CippTestZTNA24547 {
812
$IntunePolicies = New-CIPPDbRequest -TenantFilter $Tenant -Type 'IntuneDeviceCompliancePolicies'
913

1014
if (-not $IntunePolicies) {
11-
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Investigate' -ResultMarkdown 'Intune policies not found in database' -Risk 'High' -Name 'Compliance policies protect personally owned Android devices' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Tenant'
15+
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Skipped' -ResultMarkdown 'No data found in database. This may be due to missing required licenses or data collection not yet completed.' -Risk 'High' -Name 'Compliance policies protect personally owned Android devices' -UserImpact 'Medium' -ImplementationEffort 'Low' -Category 'Tenant'
1216
return
1317
}
1418

Modules/CIPPCore/Public/Tests/ZTNA/Devices/Invoke-CippTestZTNA24548.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
function Invoke-CippTestZTNA24548 {
2+
<#
3+
.SYNOPSIS
4+
Data on iOS/iPadOS is protected by app protection policies
5+
#>
26
param($Tenant)
37

48
$TestId = 'ZTNA24548'
@@ -8,7 +12,7 @@ function Invoke-CippTestZTNA24548 {
812
$IosPolicies = New-CIPPDbRequest -TenantFilter $Tenant -Type 'IntuneIosAppProtectionPolicies'
913

1014
if (-not $IosPolicies) {
11-
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Investigate' -ResultMarkdown 'iOS app protection policies not found in database' -Risk 'High' -Name 'Data on iOS/iPadOS is protected by app protection policies' -UserImpact 'Low' -ImplementationEffort 'Low' -Category 'Tenant'
15+
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Skipped' -ResultMarkdown 'No data found in database. This may be due to missing required licenses or data collection not yet completed.' -Risk 'High' -Name 'Data on iOS/iPadOS is protected by app protection policies' -UserImpact 'Low' -ImplementationEffort 'Low' -Category 'Tenant'
1216
return
1317
}
1418

Modules/CIPPCore/Public/Tests/ZTNA/Devices/Invoke-CippTestZTNA24549.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
function Invoke-CippTestZTNA24549 {
2+
<#
3+
.SYNOPSIS
4+
Data on Android is protected by app protection policies
5+
#>
26
param($Tenant)
37

48
$TestId = 'ZTNA24549'
@@ -8,7 +12,7 @@ function Invoke-CippTestZTNA24549 {
812
$AndroidPolicies = New-CIPPDbRequest -TenantFilter $Tenant -Type 'IntuneAndroidAppProtectionPolicies'
913

1014
if (-not $AndroidPolicies) {
11-
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Investigate' -ResultMarkdown 'Android app protection policies not found in database' -Risk 'High' -Name 'Data on Android is protected by app protection policies' -UserImpact 'Low' -ImplementationEffort 'Low' -Category 'Tenant'
15+
Add-CippTestResult -TenantFilter $Tenant -TestId $TestId -TestType 'Devices' -Status 'Skipped' -ResultMarkdown 'No data found in database. This may be due to missing required licenses or data collection not yet completed.' -Risk 'High' -Name 'Data on Android is protected by app protection policies' -UserImpact 'Low' -ImplementationEffort 'Low' -Category 'Tenant'
1216
return
1317
}
1418

Modules/CIPPCore/Public/Tests/ZTNA/Devices/Invoke-CippTestZTNA24550.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
function Invoke-CippTestZTNA24550 {
2+
<#
3+
.SYNOPSIS
4+
Data on Windows is protected by BitLocker encryption
5+
#>
26
param($Tenant)
37
#Tested - Device
48

59
try {
610
$ConfigurationPolicies = New-CIPPDbRequest -TenantFilter $Tenant -Type 'IntuneConfigurationPolicies'
711
if (-not $ConfigurationPolicies) {
8-
Add-CippTestResult -TenantFilter $Tenant -TestId 'ZTNA24550' -TestType 'Devices' -Status 'Investigate' -ResultMarkdown 'Intune configuration policies not found in database' -Risk 'High' -Name 'Data on Windows is protected by BitLocker encryption' -UserImpact 'Low' -ImplementationEffort 'Low' -Category 'Device'
12+
Add-CippTestResult -TenantFilter $Tenant -TestId 'ZTNA24550' -TestType 'Devices' -Status 'Skipped' -ResultMarkdown 'No data found in database. This may be due to missing required licenses or data collection not yet completed.' -Risk 'High' -Name 'Data on Windows is protected by BitLocker encryption' -UserImpact 'Low' -ImplementationEffort 'Low' -Category 'Device'
913
return
1014
}
1115

0 commit comments

Comments
 (0)