6 Commits

Author SHA1 Message Date
Doug Rios
37e2b70ba4 Merge pull request #146 from CriticalSolutionsNetwork/Fix-pw-notification-test
Fix pw notification test
2024-07-23 08:17:32 -05:00
DrIOS
8acae46b98 docs: Update CHANGELOG 2024-07-23 07:53:00 -05:00
DrIOS
1fd460c84d fix: notification window for 1.3.1 2024-07-23 07:51:15 -05:00
Doug Rios
9f28c976ce Merge pull request #144 from CriticalSolutionsNetwork/Test-Help
docs: Update Help Wiki
2024-07-07 17:45:21 -05:00
DrIOS
1ec287031c docs: Update Help Wiki 2024-07-07 17:43:25 -05:00
DrIOS
de89312352 docs: Update Help Wiki 2024-07-07 17:41:04 -05:00
6 changed files with 17 additions and 9 deletions

View File

@@ -4,6 +4,12 @@ The format is based on and uses the types of changes according to [Keep a Change
## [Unreleased]
### Fixed
- Fixed test 1.3.1 as notification window for password expiration is no longer required.
## [0.1.24] - 2024-07-07
### Added
- New private function `Get-AuditMailboxDetail` for 6.1.2 and 6.1.3 tests to get the action details for the test.

View File

@@ -11,6 +11,14 @@ This PowerShell module is based on CIS benchmarks and is distributed under the C
For full license details, please visit [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en).
[Register for and download CIS Benchmarks](https://www.cisecurity.org/cis-benchmarks)
# Table of Contents
1. [Invoke-M365SecurityAudit](#Invoke-M365SecurityAudit)
2. [Export-M365SecurityAuditTable](#Export-M365SecurityAuditTable)
3. [Get-AdminRoleUserLicense](#Get-AdminRoleUserLicense)
4. [Get-MFAStatus](#Get-MFAStatus)
5. [Grant-M365SecurityAuditConsent](#Grant-M365SecurityAuditConsent)
6. [Remove-RowsWithEmptyCSVStatus](#Remove-RowsWithEmptyCSVStatus)
7. [Sync-CISExcelAndCsvData](#Sync-CISExcelAndCsvData)
## Invoke-M365SecurityAudit

BIN
README.md

Binary file not shown.

Binary file not shown.

View File

@@ -1,11 +1,11 @@
Import-Module .\output\module\M365FoundationsCISReport\*\*.psd1
. .\source\Classes\CISAuditResult.ps1
.\helpers\psDoc-master\src\psDoc.ps1 -moduleName M365FoundationsCISReport -outputDir docs -template ".\helpers\psDoc-master\src\out-html-template.ps1"
.\helpers\psDoc-master\src\psDoc.ps1 -moduleName M365FoundationsCISReport -outputDir ".\" -template ".\helpers\psDoc-master\src\out-markdown-template.ps1" -fileName ".\README.md"
.\helpers\psDoc-master\src\psDoc.ps1 -moduleName M365FoundationsCISReport -outputDir ".\" -template ".\helpers\psDoc-master\src\out-markdown-template.ps1" -fileName ".\README.md" -
<#
$ver = "v0.1.23"
$ver = "v0.1.24"
git checkout main
git pull origin main
git tag -a $ver -m "Release version $ver refactor Update"

View File

@@ -45,13 +45,12 @@ function Test-PasswordNeverExpirePolicy {
$isDefault = $domain.IsDefault
# Step (Condition C): Determine if the notification window is set to 30 days
$notificationWindow = $domain.PasswordNotificationWindowInDays
$notificationPolIsCompliant = $notificationWindow -eq 30
$notificationPolIsCompliant = $true # No longer a requirement
# Step (Condition A): Retrieve password expiration policy
$passwordPolicy = $domain.PasswordValidityPeriodInDays
$pwPolIsCompliant = $passwordPolicy -eq 2147483647
# Step (Condition A & B): Determine if the policy is compliant
$overallResult = $overallResult -and $notificationPolIsCompliant -and $pwPolIsCompliant
# Step (Condition A & B): Prepare failure reasons and details based on compliance
$failureReasons = if ($notificationPolIsCompliant -and $pwPolIsCompliant) {
"N/A"
@@ -59,18 +58,14 @@ function Test-PasswordNeverExpirePolicy {
else {
"Password expiration is not set to never expire or notification window is not set to 30 days for domain $domainName. Run the following command to remediate: `nUpdate-MgDomain -DomainId $domainName -PasswordValidityPeriodInDays 2147483647 -PasswordNotificationWindowInDays 30`n"
}
$details = "$domainName|$passwordPolicy days|$notificationWindow days|$isDefault"
# Add details and failure reasons to the lists
$detailsList += $details
$failureReasonsList += $failureReasons
}
# Prepare the final failure reason and details
$finalFailureReason = $failureReasonsList -join "`n"
$finalDetails = $detailsList -join "`n"
# Step: Create and populate the CISAuditResult object
$params = @{
Rec = $recnum
@@ -86,7 +81,6 @@ function Test-PasswordNeverExpirePolicy {
$auditResult = Get-TestError -LastError $LastError -recnum $recnum
}
}
end {
# Return the audit result
return $auditResult