> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/azure-application-gateway-waf-policy-is-not-enabled-in-prevention-mode.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# Azure Application Gateway WAF policy is not enabled in prevention mode

### Synopsis

| Field               | Value                                                                  |
| ------------------- | ---------------------------------------------------------------------- |
| Rule Type           | Detection                                                              |
| Finding Type        | Azure Application Gateway WAF policy is not enabled in prevention mode |
| Finding ID          | 60000922                                                               |
| Generates a Finding | This detection rule also generates a finding                           |
| Severity            | Medium                                                                 |
| Category            | CONFIGURATION                                                          |
| Cloud Providers     | AZURE                                                                  |
| Platform Module     | CSPM                                                                   |
| Asset Types         | AZURE\_APPLICATION\_GATEWAY\_WAF\_POLICY                               |
| ATT\&CK Tactic      | TA0112 (TA0112)                                                        |
| ATT\&CK Technique   | T1686.001 (T1686.001)                                                  |

### Description

Azure Application Gateways with WAF policies not enabled in prevention mode present a significant security risk. Failure to enable prevention mode leaves applications vulnerable to malicious traffic.

Application Gateway Web Application Firewall (WAF) policies offer two modes: detection and prevention. Detection mode only logs malicious traffic without blocking it, useful for testing but insufficient for production environments. Prevention mode actively blocks malicious requests, protecting applications from attacks such as cross-site scripting (XSS) and SQL injection. Operating in detection mode allows malicious actors to compromise the application.

The impact of this misconfiguration is direct exposure to various attacks. Prevention mode is crucial for mitigating risks and ensuring the application's security posture. Malicious actors can exploit this weakness to gain unauthorized access, steal data, or disrupt services.

To remediate, ensure all Azure Application Gateway WAF policies are configured in prevention mode. Regularly review and update WAF rules to address emerging threats. Implement robust logging and monitoring to detect any bypass attempts. Employ a layered security approach, combining WAF with other security controls.

### Remediation

**Manual steps:**

Azure Application Gateway WAF Policy - Manual remediation steps:

1. Log in to Azure Portal
2. Navigate to 'Web Application Firewall policies (WAF)' dashboard
3. Click on the reported WAF policy
4. In 'Overview' section, Click on 'Switch to prevention mode'.

NOTE: Define managed rule or custom rules properly as per your business requirement before transitioning to Prevention mode. This can help in unexpected blocked traffic.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/azure-application-gateway-waf-policy-is-not-enabled-in-prevention-mode.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
