Skip to content

Network - 26882 - Bot protection ruleset is enabled and assigned in Application Gateway WAF#1112

Merged
merill merged 5 commits intodevfrom
feature-26882
Apr 2, 2026
Merged

Network - 26882 - Bot protection ruleset is enabled and assigned in Application Gateway WAF#1112
merill merged 5 commits intodevfrom
feature-26882

Conversation

@sandeepjha000
Copy link
Copy Markdown
Collaborator

@sandeepjha000 sandeepjha000 self-assigned this Mar 27, 2026
@sandeepjha000 sandeepjha000 marked this pull request as draft March 27, 2026 04:27
@sandeepjha000 sandeepjha000 added the ready for review PR is ready for review and merging label Mar 31, 2026
@sandeepjha000 sandeepjha000 marked this pull request as ready for review March 31, 2026 23:40
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.

@sandeepjha000 Please, address my feedback.

@@ -0,0 +1,12 @@
Azure Application Gateway Web Application Firewall (WAF) provides bot protection through the Microsoft Bot Manager ruleset, which identifies and categorizes automated traffic based on behavioral patterns, known bot signatures, and IP reputation. Without bot protection enabled, threat actors leverage automated tools to perform large-scale attacks that would be impractical manually: credential stuffing attacks that test stolen username and password combinations across login endpoints at thousands of attempts per minute, content scraping that extracts proprietary data and pricing information for competitive exploitation, inventory hoarding bots that deplete product availability for legitimate customers, and application-layer denial of service attacks that overwhelm backend resources.

These automated attacks often originate from distributed botnets that rotate IP addresses to evade simple rate limiting, making signature-based bot detection essential. The Bot Manager ruleset classifies bots into categories including known good bots (search engines), known bad bots (scrapers, spammers), and unknown bots, allowing granular policy enforcement. Without this classification, malicious bot traffic blends with legitimate requests, consuming application resources and enabling fraud that damages revenue and customer trust. By enabling the Bot Manager ruleset on Application Gateway WAF, organizations ensure automated attacks are identified and blocked before they can exploit application vulnerabilities or exhaust backend capacity.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"By enabling the Bot Manager ruleset on Application Gateway WAF, organizations ensure automated attacks are identified and blocked before they can exploit application vulnerabilities or exhaust backend capacity."

Where is this sentence coming from? It's not in the spec.

function Test-Assessment-26882 {
[ZtTest(
Category = 'Azure Network Security',
ImplementationCost = 'Low',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Service = ('Azure') is missing.

return
}

# Fail if any attached policy is not enabled, not in Prevention mode, or missing the Microsoft_BotManagerRuleSet
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Duplicated pass/fail logic between assessment and report

The three-condition check (Enabled + Prevention + BotManager ruleset) appears in both the $failingPolicies filter and the $statusDisplay computation. Consider precomputing a $isPassing property on each policy to avoid logic drift:

foreach ($policy in $policies) {
    $policy | Add-Member -NotePropertyName IsPassing -NotePropertyValue (
        $policy.EnabledState -eq 'Enabled' -and
        $policy.Mode -eq 'Prevention' -and
        ($policy.ManagedRuleSets | Where-Object { $_.ruleSetType -eq 'Microsoft_BotManagerRuleSet' }).Count -gt 0
    )
}
$passed = ($policies | Where-Object { -not $_.IsPassing }).Count -eq 0

@alexandair alexandair self-requested a review April 2, 2026 04:40
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 a0ceaaa into dev Apr 2, 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.

3 participants