Skip to content

Network - 26884 - Bot protection ruleset is enabled and assigned in Azure Front Door WAF#938

Open
aahmed-spec wants to merge 5 commits intomainfrom
test-26884
Open

Network - 26884 - Bot protection ruleset is enabled and assigned in Azure Front Door WAF#938
aahmed-spec wants to merge 5 commits intomainfrom
test-26884

Conversation

@aahmed-spec
Copy link
Collaborator

Bot protection ruleset is enabled and assigned in Azure Front Door WAF
spec

@aahmed-spec aahmed-spec self-assigned this Feb 23, 2026
@aahmed-spec aahmed-spec marked this pull request as ready for review February 23, 2026 12:09
@alexandair alexandair requested a review from Copilot February 23, 2026 12:10
Copy link
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

Adds a new PowerShell assessment test (ID 26884) to evaluate whether Azure Front Door Premium profiles have the Bot Manager ruleset enabled in the associated WAF policy and assigned via security policies, plus accompanying markdown guidance for the report output.

Changes:

  • Introduces Test-Assessment-26884 to discover Front Door profiles, security policies, and WAF policy managed rulesets and report pass/fail.
  • Generates markdown report tables summarizing bot protection status across Premium profiles and “skipped” Standard profiles.
  • Adds remediation/documentation content for test 26884.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/powershell/tests/Test-Assessment.26884.ps1 New assessment implementation for Front Door WAF Bot Manager ruleset enablement/assignment, with markdown reporting.
src/powershell/tests/Test-Assessment.26884.md New test description/remediation markdown consumed by report generation.

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

@aahmed-spec aahmed-spec added the ready for review PR is ready for review and merging label Feb 24, 2026
Copy link
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.

Copy link
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.

Copy link
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.

if ($associations) {
foreach ($assoc in $associations) {
if ($assoc.domains) {
$domainsProtected += $assoc.domains.Count
Copy link
Collaborator

Choose a reason for hiding this comment

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

The $domainsProtected counter accumulates domains from ALL security policies in the loop, not just the one with bot protection. If a profile has two security policies where only the second has bot protection, the domain count includes domains from the first (non-bot-protected) policy.

This doesn't affect pass/fail logic but produces inaccurate "Domains Protected" values in the output table.

Fix: Reset $domainsProtected when evaluating each security policy or only count domains from the security policy whose WAF has bot protection.

$ruleSetAction = $ruleSet.ruleSetAction
}
else {
$ruleSetAction = 'Block (default)'
Copy link
Collaborator

Choose a reason for hiding this comment

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

When ruleSetAction is null on a Bot Manager rule set, individual rules' built-in actions apply per bot category — it is not a blanket "Block". The current fallback of 'Block (default)' is inaccurate. Recommend changing to 'Per-rule defaults' or simply 'Not set'.

https://learn.microsoft.com/en-us/azure/web-application-firewall/afds/afds-overview#waf-actions

@@ -0,0 +1,21 @@
Azure Front Door is a global, scalable entry point that uses the Microsoft global edge network to deliver fast, secure, and highly scalable web applications. Web Application Firewall (WAF) integrated with Azure Front Door provides protection against common web exploits and vulnerabilities at the network edge. The Bot Manager rule set is a managed rule set available exclusively in Azure Front Door Premium SKU that provides protection against malicious bots while allowing legitimate bots such as search engine crawlers to access your applications. When bot protection is not enabled, threat actors can deploy automated attacks against web applications including credential stuffing attacks that test stolen username/password combinations at scale, web scraping that extracts sensitive data or intellectual property, inventory hoarding bots that deplete product availability, and application-layer DDoS attacks that exhaust backend resources. The Bot Manager rule set categorizes bots into good bots, bad bots, and unknown bots, allowing security teams to configure appropriate actions for each category. Bad bots can be blocked or challenged with CAPTCHA, while good bots like Googlebot and Bingbot are allowed through. Without bot protection, organizations lack visibility into bot traffic patterns and cannot distinguish between human users and automated clients, making it impossible to defend against sophisticated bot-driven attacks that bypass traditional rate limiting and IP-based controls.

**Remediation action**
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Remediation action" section doesn't match the spec.
Resource 5 is missing.

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