waf-audit

Scan Azure Front Door WAF policies in Bicep and ARM templates for misconfigured managed rules.

Updated May 7, 2026
One-click install
npx skills add https://github.com/tmalcolm-0607/mad-council-claw --skill waf-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: waf-audit
Source: https://github.com/tmalcolm-0607/mad-council-claw/tree/main/.claude/skills/waf-audit
Command: npx skills add https://github.com/tmalcolm-0607/mad-council-claw --skill waf-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Azure Front Door WAF managed rules 200002 and 200003 silently block file uploads exceeding the 128KB body inspection limit, returning HTTP 403 errors that never reach the application backend and making root cause analysis extremely difficult. This skill scans Bicep and ARM deployment templates to detect these misconfigurations, classifies risk across 5 key dimensions, and generates API-version-aware remediation snippets.

Core Features & Use Cases

  • Automated Template Scanning: Discovers AFD WAF policies in Bicep and ARM JSON templates across entire repository directories, including parameterized modes and conditional deployment gates.
  • 5-Dimension Risk Classification: Evaluates deployment state, WAF mode, request body check status, rule override compliance, and upload exposure to assign accurate risk levels from DEFERRED to CRITICAL.
  • Remediation Generation: Produces ready-to-use Bicep fix snippets that disable rules 200002 and 200003 for confirmed upload services, with API-version-safe syntax that omits unnecessary action fields.
  • Advisory Reporting: Flags App Gateway WAF OWASP CRS rules that may block multipart uploads, and compares live template scans against a dated baseline to detect infrastructure-as-code drift.
  • Use Case: A cloud engineer preparing to promote an AFD WAF policy from Detection to Prevention mode can run this audit to confirm no upload-blocking rules are active, avoiding production outages for file upload endpoints.

Quick Start

Use the waf-audit skill to scan your repository's infrastructure-as-code templates for Azure Front Door WAF misconfigurations that block file uploads.

Frequently Asked Questions about waf-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does Azure Front Door WAF block file uploads with HTTP 403 errors?

Azure Front Door WAF blocks file uploads with HTTP 403 errors when managed rules 200002 and 200003 inspect request bodies exceeding the 128KB limit, silently rejecting traffic before it reaches the application backend.

How do I scan Bicep templates for Azure Front Door WAF misconfigurations?

Scan Bicep templates for Azure Front Door WAF misconfigurations by auditing repository directories to detect parameterized deployment modes and rule overrides that block file uploads, generating ready-to-use remediation snippets.

Can I audit ARM JSON deployment templates for AFD WAF policy drift?

You can audit ARM JSON deployment templates for AFD WAF policy drift by comparing live template scans against a dated baseline snapshot, detecting manual Azure Portal fixes and infrastructure-as-code inconsistencies.

Does the WAF audit modify existing infrastructure-as-code files?

The WAF audit operates with strict read-only execution that never modifies infrastructure code, only generating risk classifications, advisory reports, and API-version-aware Bicep fix snippets for confirmed upload services.

What is the best way to promote Azure Front Door WAF from Detection to Prevention mode?

The best way to promote Azure Front Door WAF from Detection to Prevention mode is running a pre-promotion audit to confirm no upload-blocking rules are active, avoiding production outages for file upload endpoints.

What are the limitations of auditing AFD WAF rules for multipart upload blocking?

A limitation of auditing AFD WAF rules is that while it flags App Gateway WAF OWASP CRS rules that may block multipart uploads, it cannot modify live infrastructure and only assesses Bicep and ARM template configurations.