Skip to content

Network - 26884 - Bot protection rule set is enabled and assigned in Azure Front Door WAF#1076

Merged
merill merged 3 commits intodevfrom
dev-26884
Mar 20, 2026
Merged

Network - 26884 - Bot protection rule set is enabled and assigned in Azure Front Door WAF#1076
merill merged 3 commits intodevfrom
dev-26884

Conversation

@aahmed-spec
Copy link
Copy Markdown
Collaborator

made changes as per updated spec

@aahmed-spec aahmed-spec changed the base branch from main to dev March 17, 2026 11:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates assessment test 26884 to align with an updated spec for Azure Front Door WAF Bot Manager protection, adding stricter evaluation criteria and updating test messaging/title accordingly.

Changes:

  • Renames the test title wording from “ruleset” to “rule set”.
  • Extends WAF policy evaluation to include WAF mode and Bot Manager rule-enabled checks.
  • Updates pass/fail result messaging to reflect the new criteria.
Comments suppressed due to low confidence (1)

src/powershell/tests/Test-Assessment.26884.ps1:263

  • The pass/fail message says all WAF policies attached to Azure Front Door are enabled, in Prevention mode, and have Bot Manager configured with an enabled rule, but the evaluation short-circuits on the first security policy that meets the criteria (break once $hasValidBotProtection is true). If a Front Door profile has multiple security policies/WAF policies, this can pass even when other attached policies are non-compliant. Either enforce the criteria across all security policies/WAF policies attached to the profile (and reflect that in $hasValidBotProtection), or adjust the messaging/intent to “at least one attached policy is compliant.”
                                    # Check if WAF policy is enabled, in Prevention mode, and Bot Manager is present with at least one rule enabled
                                    if ($wafIsPremium -and $wafEnabled -eq 'Enabled' -and $wafMode -eq 'Prevention' -and $hasEnabledRule) {
                                        $hasValidBotProtection = $true
                                        # Only count domains from security policy with valid bot protection
                                        $domainsProtected = $currentPolicyDomainCount
                                    }
                                    break

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/powershell/tests/Test-Assessment.26884.ps1
Comment thread src/powershell/tests/Test-Assessment.26884.ps1
Comment thread src/powershell/tests/Test-Assessment.26884.ps1 Outdated
@aahmed-spec aahmed-spec self-assigned this Mar 18, 2026
@aahmed-spec aahmed-spec marked this pull request as ready for review March 18, 2026 11:29
@aahmed-spec aahmed-spec added the ready for review PR is ready for review and merging label Mar 18, 2026
Copy link
Copy Markdown
Collaborator

@alexandair alexandair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aahmed-spec Please, address my feedback.

Comment thread src/powershell/tests/Test-Assessment.26884.ps1 Outdated
Comment thread src/powershell/tests/Test-Assessment.26884.ps1
@aahmed-spec aahmed-spec requested a review from alexandair March 19, 2026 12:16
Copy link
Copy Markdown
Collaborator

@alexandair alexandair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@merill merill merged commit 961242f into dev Mar 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review PR is ready for review and merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants