Skip to content

Commit

Permalink
Gr2v6 bugfix number of banned password (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
dutt0 authored Jan 6, 2025
1 parent 6cca008 commit 9b04ed4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Binary file modified psmodules/Check-OnlineAttackCountermeasures.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion setup/IaC/modules/automationaccount.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ resource guardrailsAC 'Microsoft.Automation/automationAccounts@2021-06-22' = if
properties: {
contentLink: {
uri: '${ModuleBaseURL}/Check-OnlineAttackCountermeasures.zip'
version: '1.0.2'
version: '1.0.3'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
RootModule = 'Check-OnlineAttackCountermeasures'

# Version number of this module.
ModuleVersion = '1.0.2'
ModuleVersion = '1.0.3'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,16 @@ function Check-OnlineAttackCountermeasures {
$requiredBannedPasswords = @("password", "Password!", "Summer2018")
$missingPasswords = $requiredBannedPasswords | Where-Object { $_ -notin $bannedPasswords }

# Condition: Any of the 3 banned passwords are missing
if ($missingPasswords.Count -gt 0) {
$IsCompliant = $false
$BannedPasswordListNonCompliant = $true
}
# Condition:There should be other restricted password components expect only these three
if ($missingPasswords.Count -eq 0 -and $bannedPasswords.Count -eq 3){
$IsCompliant = $false
$BannedPasswordListNonCompliant = $true
}
}
}
catch {
Expand Down

0 comments on commit 9b04ed4

Please sign in to comment.