Skip to content

Commit 68757fc

Browse files
committed
Improve warning messages
1 parent 770a14f commit 68757fc

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

modules/check_CAPs.psm1

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,10 @@ function ConvertTo-Yaml {
572572
$targetedCount = @($includedRoleIds).Count
573573
$scopedCount = @($ScopedRolesInPolicy).Count
574574

575-
$roleWord = if ($targetedCount -eq 1) { "role" } else { "roles" }
576-
$assignmentWord = if ($scopedCount -eq 1) { "scoped assignment" } else { "scoped assignments" }
575+
$roleWord = if ($targetedCount -eq 1) { "targeted role" } else { "targeted roles" }
576+
$assignmentWord = if ($scopedCount -eq 1) { "has scoped assignments" } else { "have scoped assignments" }
577577

578-
$ScopedRolesWarning = "targeting $targetedCount $roleWord includes $scopedCount $assignmentWord"
578+
$ScopedRolesWarning = "$scopedCount of the $targetedCount $roleWord $assignmentWord"
579579
}
580580

581581

@@ -975,28 +975,28 @@ $MissingPoliciesHTML = ""
975975

976976
# Check each policy variable and add corresponding warning messages
977977
if (!$PolicyDeviceCodeFlow) {
978-
$Warnings += "No policy targeting the DeviceCode Flow found!"
978+
$Warnings += "No policy targeting the Device Code flow found!"
979979
}
980980
if (!$PolicyLegacyAuth) {
981-
$Warnings += "No policy targeting legacy Authentication found!"
981+
$Warnings += "No policy targeting legacy authentication found!"
982982
}
983983
if (!$PolicyRiskySignIn) {
984-
$Warnings += "No policy targeting risky sign-ins!"
984+
$Warnings += "No policy targeting risky sign-ins found!"
985985
}
986986
if (!$PolicyUserRisk) {
987-
$Warnings += "No policy targeting user risk!"
987+
$Warnings += "No policy targeting user risk found!"
988988
}
989989
if (!$PolicyRegSecInfo) {
990-
$Warnings += "No policy limiting the registrations of security information!"
990+
$Warnings += "No policy limiting the registrations of security information found!"
991991
}
992992
if (!$PolicyRegDevices) {
993-
$Warnings += "No policy limiting joining or registering devices!"
993+
$Warnings += "No policy limiting joining or registering devices found!"
994994
}
995995
if (!$PolicyMfaUser) {
996-
$Warnings += "No policy enforcing MFA!"
996+
$Warnings += "No policy enforcing MFA found!"
997997
}
998998
if (!$PolicyAuthStrength) {
999-
$Warnings += "No policy enforcing Authentication Strength (Phishing resistant MFA for admins)!"
999+
$Warnings += "No policy enforcing Authentication Strength (e.g., phishing-resistant MFA) for admins found!"
10001000
}
10011001

10021002
if ($Warnings.count -ge 1) {

0 commit comments

Comments
 (0)