From 5f9beb27cd52ccba5d67861f6bb1ebef24c3c7e9 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Tue, 17 Nov 2026 13:37:00 -0800 Subject: [PATCH 1/3] docs(waf): correct WAF mode wording (Detect only / Enforce high-confidence), add mode table and Reviewing detections Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6 --- src/content/docs/whp/admin/coraza-waf.mdx | 84 ++++++++++++++----- .../docs/whp/admin/site-monitoring.mdx | 2 +- 2 files changed, 63 insertions(+), 23 deletions(-) diff --git a/src/content/docs/whp/admin/coraza-waf.mdx b/src/content/docs/whp/admin/coraza-waf.mdx index b5d0d6a..206ccfe 100644 --- a/src/content/docs/whp/admin/coraza-waf.mdx +++ b/src/content/docs/whp/admin/coraza-waf.mdx @@ -1,28 +1,40 @@ --- title: Coraza WAF rules -description: Set the global WAF mode, tune individual rules, audit blocked requests, and add per-host overrides. +description: What each WAF mode really does, how to review logged detections and blocked requests, tune individual rules, and add per-host overrides. sidebar: order: 3 --- -import { Aside } from '@astrojs/starlight/components'; +import { Aside, Steps } from '@astrojs/starlight/components'; import SuperAdmin from '~/content/partials/super-admin-callout.mdx'; import AdminSignIn from '~/content/partials/admin-signin.mdx'; import Support from '~/content/partials/support-link.mdx'; -[Coraza](https://coraza.io/) is an open-source web-application firewall (WAF) that runs as a sidecar in front of your sites. The **Coraza Rules** page in the admin sidebar gives you a UI to set the global mode, tune individual rules, and audit blocked requests — all without rebuilding the sidecar image. +[Coraza](https://coraza.io/) is an open-source web-application firewall (WAF) that runs as a sidecar in front of your sites. The **Coraza Rules** page in the admin sidebar gives you a UI to set the global mode, tune individual rules, and review detections and blocked requests — all without rebuilding the sidecar image. ![Coraza Rules page — Firing rules tab](~/assets/screenshots/whp/admin-coraza.png) ## Global WAF mode -A coloured pill at the top of the page shows the **Global WAF mode** with a **change** link: +The mode is set in **Server Settings → Security** (the **change** link next to the pill on the Coraza Rules page takes you there). The same names are used in both places: **Off**, **Detect only** and **Enforce (high-confidence)**. -- **Off** — no inspection. Requests pass untouched. -- **Detect** — inspect and log matches; do not block. Use during a roll-out or while validating a rule change. -- **Enforce** — inspect and block anything that matches an enforcing rule. +### What each mode does + +| Mode | What happens to a matching request | +|---|---| +| **Off** | No inspection. The WAF sidecar is stopped and requests pass untouched. | +| **Detect only** | Every rule is evaluated and the match is logged to the WAF audit log. No WHP rule changes the response, except the small always-on set of high-confidence protections listed under **Enforce** below. | +| **Enforce (high-confidence)** | Blocks high-confidence attacks only: path traversal / file inclusion, remote command execution, PHP and Java code injection, restricted file types, and known CVE exploits. SQL injection, cross-site scripting, scanner signatures and the anomaly score are **logged but not blocked**, to avoid breaking legitimate sites and editors. | + + + + The WAF is **fail-open**: if the Coraza sidecar is itself unhealthy, traffic still flows. @@ -30,7 +42,7 @@ The WAF is **fail-open**: if the Coraza sidecar is itself unhealthy, traffic sti -## The three tabs +## The four tabs ### Firing rules @@ -42,7 +54,7 @@ Columns: - **Hits** — how many times the rule fired in the time window. - **Top hosts** — the top customer domains that triggered this rule (with per-host hit counts). - **Top URIs** — the most common request paths that triggered it (helpful for distinguishing scans from real traffic). -- **State** — per-rule override of the global mode. Options: `(default → enforce)`, `(default → detect)`, `(default → score)`, `off`. Picking anything other than `(default → …)` overrides the global mode for that rule. +- **State** — per-rule override of the global mode. Options: `(default → …)`, `enforce`, `detect`, `off`. The text after the arrow is what the rule does today (for example `detect`, `score` or `enforce`), based on the global mode and the built-in high-confidence list. A rule marked `score` only adds to the anomaly score and is logged, not blocked, in Enforce mode. Picking `enforce`, `detect` or `off` overrides the default for that rule. - **Per-host** — opens a **Hosts (N)** drawer to set per-host overrides for that rule.