Skip to content

Commit 2472597

Browse files
[Page Shield] Customized alerts (#18500)
* Update alerts * Update alerts that may become immediate * Update alerts on policies (received feedback) * Update heading * Add changelog entry * Add link * Apply suggestions from code review --------- Co-authored-by: Patricia Santa Ana <[email protected]>
1 parent 84f9bfc commit 2472597

File tree

7 files changed

+48
-15
lines changed

7 files changed

+48
-15
lines changed

src/content/changelogs/page-shield.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ productLink: "/page-shield/"
55
productArea: Application security
66
productAreaLink: /fundamentals/reference/changelog/security/
77
entries:
8+
- publish_date: "2024-12-02"
9+
title: Alerts based on customer-defined policies
10+
description: |-
11+
You can now scope all of Page Shield's alert types to selected zones and their associated policies, alerting only on the resources that have been explicitly allowed.
12+
813
- publish_date: "2024-09-30"
914
title: New machine learning (ML) scores for detected scripts
1015
description: |-

src/content/docs/page-shield/detection/configure-alerts.mdx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,32 @@ Only available to customers on a Business or Enterprise plan.
1818
<Render file="alerts-intro" />
1919

2020
<Render file="alerts-configure" />
21+
22+
## Alerts on policies
23+
24+
:::note
25+
Applies to Enterprise customers with a paid add-on.
26+
:::
27+
28+
If you have configured [allow policies](/page-shield/policies/#policy-actions) in a zone (policies which allow specific scripts and connections and block everything else), you can filter alert notifications according to those policies.
29+
30+
When you set the **Policies of these zones** filter in a Page Shield alert, you will only receive the most relevant notifications based on the values of the allow policies you configured.
31+
32+
For each alert configured with a filter, Page Shield will do the following:
33+
34+
1. Check which allow policies in a zone are enabled.
35+
2. For every enabled policy, compare the URL of the new or changed resource against the allowed sources in the policy.
36+
3. If the resource is allowed by the policy, check if the new or modified resource should trigger the current Page Shield alert.
37+
4. If the alert should trigger, send an alert notification to the configured destinations.
38+
39+
:::note
40+
When you set the **Policies of these zones** filter in an alert you will not receive notifications for resources blocked by an allow policy. These are [policy violations](/page-shield/policies/violations/) that you can review in the dashboard, through GraphQL, or via Logpush.
41+
:::
42+
43+
You will not receive notifications for alerts configured with a **Policies of these zones** filter in the following cases:
44+
45+
- No configured policies in the zone
46+
- Policy configured in log mode
47+
- Policy is not enabled
48+
49+
For alerts without a **Policies of these zones** filter, you will receive alerts for resources detected in all your zones, and you may receive alerts about resources that are blocked by one of your configured allow policies.

src/content/docs/page-shield/get-started.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ Depending on your plan, you may be able to also review the connections made by s
3232
## Configure alerts
3333

3434
:::note
35-
3635
Only available to customers on a Business or Enterprise plan.
3736
:::
3837

src/content/docs/page-shield/reference/csp-header.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The format of the <GlossaryTooltip term="content security policy (CSP)">Content
1414
content-security-policy-report-only: script-src 'none'; connect-src 'none'; report-uri https://csp-reporting.cloudflare.com/cdn-cgi/script_monitor/report?<QUERY_STRING>
1515
```
1616

17-
If you [configured the CSP reporting endpoint](/page-shield/reference/settings/#csp-reporting-endpoint) to use the same hostname, the HTTP header will have the following format:
17+
If you [configured the reporting endpoint](/page-shield/reference/settings/#reporting-endpoint) to use the same hostname, the HTTP header will have the following format:
1818

1919
```txt
2020
content-security-policy-report-only: script-src 'none'; connect-src 'none'; report-uri <YOUR_HOSTNAME>/cdn-cgi/script_monitor/report?<QUERY_STRING>

src/content/docs/page-shield/reference/settings.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ title: Configuration settings
33
pcx_content_type: reference
44
sidebar:
55
order: 1
6-
76
---
87

9-
import { GlossaryTooltip } from "~/components"
8+
import { GlossaryTooltip } from "~/components";
109

11-
## CSP reporting endpoint
10+
## Reporting endpoint
1211

1312
When enabled, Page Shield uses a <GlossaryTooltip term="content security policy (CSP)">Content Security Policy (CSP)</GlossaryTooltip> [report-only HTTP header](/page-shield/reference/csp-header/) to gather information about all the scripts running on your application.
1413

@@ -28,8 +27,8 @@ Enterprise customers with a paid add-on can change the reporting endpoint so tha
2827

2928
Using the same hostname for CSP reporting may interfere with other Cloudflare products. Before selecting this option, ensure that your Cloudflare configuration complies with the following:
3029

31-
* No rate limiting rules match the `cdn-cgi/*` URL path
32-
* No WAF custom rules match the `cdn-cgi/*` URL path
30+
- No rate limiting rules match the `cdn-cgi/*` URL path
31+
- No WAF custom rules match the `cdn-cgi/*` URL path
3332

3433
### Configure the reporting endpoint
3534

@@ -64,6 +63,5 @@ To turn off Page Shield:
6463
3. In **Disable Page Shield**, select **Disable**.
6564

6665
:::note
67-
68-
Turning off Page Shield will not turn off [policies](/page-shield/policies/). To turn off policies, go to **Page Shield** > **Policies**.
66+
Turning off Page Shield will not turn off [policies](/page-shield/policies/). To turn off policies, go to **Page Shield** > **Policies**.
6967
:::

src/content/notifications/index.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,15 @@ entries:
243243
associatedProducts: Page Shield
244244
nextSteps: Investigate to confirm that it is an expected change.
245245
otherFilters: None.
246-
additional_information: Triggered daily.
246+
additional_information: Triggered daily. If configured with a zone filter, the alert is triggered immediately.
247247

248248
- name: Page Shield New Domain Alert
249249
audience: "[Page Shield](/page-shield/) customers who want to receive a notification when resources from new host domains appear in their domain."
250250
availability: Business plans or higher.
251251
associatedProducts: Page Shield
252252
nextSteps: Investigate to confirm that it is an expected change.
253253
otherFilters: None.
254-
additional_information: Triggered hourly.
254+
additional_information: Triggered hourly. If configured with a zone filter, the alert is triggered immediately.
255255

256256
- name: Page Shield New Malicious Domain Alert
257257
audience: "[Page Shield](/page-shield/) customers who want to receive a notification when resources from a known malicious domain appear in their domain. For more information, refer to [Malicious script and connection detection](/page-shield/how-it-works/malicious-script-detection/)."
@@ -289,7 +289,7 @@ entries:
289289
associatedProducts: Page Shield
290290
nextSteps: Investigate to confirm that it is an expected change.
291291
otherFilters: None.
292-
additional_information: Triggered daily.
292+
additional_information: Triggered daily. If configured with a zone filter, the alert is triggered immediately.
293293

294294
- name: Page Shield New Resource Exceeds Max URL Length Alert
295295
audience: "[Page Shield](/page-shield/) customers who want to receive a notification when a resource's URL exceeds the maximum allowed length."
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
{}
3-
43
---
54

65
To set up alerts:
76

87
1. Go to **Security** > **Page Shield**.
9-
2. In the **Settings** tab, select **Configure an alert**.
8+
2. In the **Settings** tab, select **Manage alerts**.
109
3. Select an [alert type](/page-shield/reference/alerts/).
11-
4. Fill in the required information and select **Create**.
10+
4. Enter the notification name and description.
11+
5. (Optional) If you are an Enterprise customer with a paid add-on, you can [define the zones for which you want to filter alerts](/page-shield/detection/configure-alerts/#alerts-on-policies) based on the configured policies in **Policies of these zones**.
12+
6. Select one or more notification destinations (notification email, webhooks, and connected notification services).
13+
7. Select **Create**.
1214

1315
To edit, delete, or disable an alert, go to your [account notifications](https://dash.cloudflare.com/?to=/:account/notifications).

0 commit comments

Comments
 (0)