# Azure Front Door WAF Rule Reviewer

> Reviews Azure Front Door WAF policy JSON for custom rules that never run, broad Allow rules, duplicate priorities, EqualsAny exclusions, disabled or Log-only overrides, old default rule sets and Detection mode. Offline and read-only; works on a policy export or an ARM template.

Azure Front Door WAF Rule Reviewer is a paid AI agent skill on Agensi by Abdelrhman Fikri, in DevOps & Cloud. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [Abdelrhman Fikri](https://www.agensi.io/creators/abdelrhman-fikri)
- Category: [DevOps & Cloud](https://www.agensi.io/skills/devops-cloud)
- Version: 1.0.0
- Last updated: 2026-12-03
- Security: scan passed (2026-12-03); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/azure-front-door-waf-rule-reviewer
- Tags: devops, security, code-review, azure, front-door, waf, custom-rules, managed-rules

## What it does

- Reads a Front Door WAF policy export or an ARM template that contains one
- Flags custom rules that never run because an earlier Allow, Block or Redirect rule stops evaluation
- Flags broad Allow rules, duplicate priorities and policies that are Disabled
- Flags EqualsAny exclusions and disabled managed rules, and warns about narrower exclusions
- Warns about Detection mode, Log-only overrides, rate limit rules that only log or lack a threshold
- Warns about default rule sets older than 2.0 and a missing bot manager rule set

## Who it's for

- **Security and platform engineers:** who own an Azure Front Door WAF policy, and reviewers approving WAF changes in a pull request.

## About this skill

WAF rules fail quietly. A broad Allow rule at priority 10 means every block rule under it never runs, two rules sharing a priority is invalid, and an exclusion that matches every cookie turns inspection off for that variable. This skill gives your agent a deterministic, offline workflow: export the policy, run the bundled reviewer, read the blockers and warnings, and fix the policy before it ships.

The reviewer is a single standard-library script. It does not call Azure and never changes a policy. It reads a policy export (properties with policySettings, customRules and managedRules) or an ARM template with a Front Door WAF policy resource. It follows the documented rule behaviour: custom rules are evaluated in priority order, an Allow, Block or Redirect stops evaluation, and Log continues. It reports rules that can never run, broad Allow rules, duplicate priorities, disabled policies, EqualsAny exclusions, disabled managed rules, Log-only overrides inside a Prevention policy, rate limit rules that only log or have no threshold, default rule sets older than 2.0 and a missing bot manager rule set.

Synthetic example policies with expected output are included so you can verify the behaviour in seconds.

## Known limitations

- Policy files only: it cannot see logs, traffic, or whether a rule matches real requests.
- Shadow detection covers identical conditions and clearly broad Allow rules; overlapping but different conditions are not analysed.
- Rule behaviour follows the documented Front Door WAF semantics at the time of writing; check the current documentation for changes.
- It reviews policy JSON as written; ARM template expressions are not evaluated.
- Reports and explains; it does not change a policy.

## Technical details

The reviewer is a single standard-library Python script. It makes no network calls and never writes files. Give it files or directories; it reads .json.

Input is either a policy export (an object with properties containing policySettings, customRules and managedRules) or an ARM template whose resources include a Front Door WAF policy. Several policies in one file are reviewed in turn.

Custom rules are sorted by priority. Following the documented behaviour (a lower number runs first; Allow, Block and Redirect stop evaluation; Log continues), a rule is reported as never running when an earlier enabled stopping rule has identical match conditions or is a broad Allow (operator Any, or an IP match of 0.0.0.0/0). Policy settings, rate limit rules, managed rule sets (version, action, group overrides) and exclusions are checked against a fixed list.

Exit codes: 0 no blockers, 1 blockers found, 2 bad arguments. Optional --format json.

Shadowing is detected only for identical or clearly broad conditions; overlapping but different conditions are not analysed.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Azure Front Door WAF Rule Reviewer skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Does it need Azure access?

No. It only reads the policy JSON you point it at.

### Which Front Door tiers does it fit?

It reads the policy shape used by Front Door WAF policies; checks that depend on newer rule sets only fire when those versions are present.

### Can it read an ARM template?

Yes. It finds Front Door WAF policy resources inside a template.

### Which Python?

Python 3.9 or newer, no packages to install.

### What does exit code 1 mean?

One or more BLOCKER findings. Warnings alone still exit 0.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
