Skip to content

Commit ea945e6

Browse files
authored
[Page Shield] Expand get started / Use Steps component (#24768)
1 parent 396be92 commit ea945e6

File tree

13 files changed

+286
-95
lines changed

13 files changed

+286
-95
lines changed

src/content/docs/page-shield/best-practices/handle-an-alert.mdx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,26 @@ sidebar:
77
label: Handle an alert
88
---
99

10-
If you receive a client-side resource alert, sometimes you need to perform some manual investigation to confirm the nature of the script. Use the guidance provided in this page as a starting point for your investigation.
10+
import { Steps } from "~/components";
11+
12+
If you receive a [client-side resource alert](/page-shield/alerts/alert-types/), sometimes you need to perform some manual investigation to confirm the nature of the script. Use the guidance provided in this page as a starting point for your investigation.
1113

1214
## 1. Understand what triggered the alert
1315

1416
Start by identifying the [detection system](/page-shield/how-it-works/malicious-script-detection/) that triggered the alert. A link is provided in the alert that will send you directly to the Cloudflare dashboard to the relevant resource that needs reviewing. Alternatively, do the following:
1517

18+
<Steps>
19+
1620
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
1721
2. Navigate to the client-side resource monitoring page:
1822
- Old dashboard: Go to **Security** > **Page Shield**.
1923
- New security dashboard: Go to **Security** > **Web assets** > **Client-side resources** tab.
2024
3. Select **Scripts** or **Connections** and search for the resource mentioned on the alert you received.
2125
4. Select **Details** next to the resource you identified. The example screenshot below shows a malicious script resource.
2226

23-
![Dialog box showing the details of a script considered malicious.](~/assets/images/page-shield/handle-alert-malicious-script-example.png)
27+
![Dialog box showing the details of a script considered malicious.](~/assets/images/page-shield/handle-alert-malicious-script-example.png)
28+
29+
</Steps>
2430

2531
The details page will specify which detection system triggered the alert. Check the values of the following fields:
2632

@@ -34,16 +40,24 @@ Different detection mechanisms may consider the script malicious at the same tim
3440

3541
If you received an alert for a potentially malicious script:
3642

43+
<Steps>
44+
3745
1. Navigate to the page on your website that is loading the script or performing the connection. Open a browser and navigate to one of the URLs in the **Page URLs** field (shown in the script details dialog box).
3846

3947
2. Open the browser's developer tools to confirm that the script is being loaded. You can check this in the developer tools' **Network** tab, searching for the script name, URL, or hostname.
4048

49+
</Steps>
50+
4151
If you received an alert for a potentially malicious connection:
4252

53+
<Steps>
54+
4355
1. Go to the page on your website where the connection that triggered the alert is being made. Open a browser and go to one of the URLs specified in the **Page URLs** field (shown in the connection details dialog box).
4456

4557
2. Open the browser's developer tools to confirm that the connection is being made. You can check this in the developer tools' **Network** tab, searching for the target hostname of the connection.
4658

59+
</Steps>
60+
4761
If you find the script or connection, this means the script is being loaded (or the connection is being established) for all website visitors — proceed to [step 3](#3-check-the-script-reputation).
4862

4963
If you do not find the script being loaded or the connection being made, this could mean one of the following:
@@ -70,10 +84,14 @@ If you believe that Cloudflare's classification is a false positive, contact you
7084

7185
You could use a virtual machine to perform some of the following analysis:
7286

87+
<Steps>
88+
7389
1. Open the script URL and get the script source code. If the script is obfuscated or encoded, this could be a sign that the script is malicious.
7490
2. Scan the script source code for any hostnames or IP addresses.
7591
3. For each hostname or IP address you identified, use Cloudflare's Security Center Investigate platform to look up threat information and/or search online for potential Indicators of Compromise.
7692

93+
</Steps>
94+
7795
---
7896

7997
## Conclusion

src/content/docs/page-shield/detection/monitor-connections-scripts.mdx

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ sidebar:
55
order: 2
66
---
77

8-
import { Render } from "~/components";
8+
import { Render, Markdown, Steps } from "~/components";
99

1010
Once you [activate Page Shield's client-side resource monitoring](/page-shield/get-started/), the main client-side resources dashboard will show which resources (scripts and connections) are running on your domain, as well as the cookies recently detected in HTTP traffic.
1111

1212
If you notice unexpected scripts or connections on the dashboard, check them for signs of malicious activity. Enterprise customers with a paid add-on will have their [connections and scripts classified as potentially malicious](/page-shield/how-it-works/malicious-script-detection/) based on threat feeds. You should also check for any new or unexpected cookies.
1313

14-
:::note
14+
:::note[Notes]
1515

1616
- Users in Free and Pro plans only have access to script monitoring.
1717
- If you recently activated client-side resource monitoring, you may see a delay in reporting.
@@ -22,27 +22,43 @@ If you notice unexpected scripts or connections on the dashboard, check them for
2222

2323
To review the resources detected by Cloudflare:
2424

25+
{/* prettier-ignore-start */}
26+
27+
<Steps>
28+
2529
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
2630

2731
2. Go to the client-side resources page:
2832
- Old dashboard: Go to **Security** > **Page Shield**.
2933
- New security dashboard: Go to **Security** > **Web assets** > **Client-side resources** tab.
3034

31-
3. Review the list of scripts, connections, and cookies for your domain. To apply a filter, select **Add filter** and use one or more of the available options:
35+
3. Review the list of scripts, connections, and cookies for your domain, depending on your plan. To apply a filter, select **Add filter** and use one or more of the available options.
36+
37+
<details>
38+
<summary>Available filters</summary>
39+
40+
- **Status**: Filter scripts or connections by [status](/page-shield/reference/script-statuses/).
3241
- **Script URL**: Filter scripts by their URL.
3342
- **Connection URL**: Filter connections by their target URL. Depending on your [configuration](/page-shield/reference/settings/#connection-target-details), it may search only by target hostname.
3443
- **Seen on host**: Look for scripts appearing on specific hostnames, or connections made in a specific hostname.
3544
- **Seen on page** (requires a Business or Enterprise plan): Look for scripts appearing in a specific page, or for connections made in a specific page. Searches the first page where the script was loaded (or where the connection was made) and the latest occurrences list.
36-
- **Status**: Filter scripts or connections by [status](/page-shield/reference/script-statuses/).
3745
- **Type**: Filter cookies according to their type: first-party cookies or unknown.
3846
- Cookie property: Filter by a cookie property such as **Name**, **Domain**, **Path**, **Same site**, **HTTP only**, and **Secure**.
3947

48+
</details>
49+
4050
4. Depending on your plan, you may be able to [view the details of each item](#view-details).
4151

52+
</Steps>
53+
54+
{/* prettier-ignore-end */}
55+
4256
## View all reported scripts or connections
4357

4458
The All Reported Connections and All Reported Scripts dashboards show all the detected resources including infrequent or inactive ones, reported in the last 30 days. After 30 days without any report, Cloudflare will delete information about a previously reported resource, and it will no longer appear in any of the dashboards.
4559

60+
<Steps>
61+
4662
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
4763
2. Go to the client-side resources page:
4864
- Old dashboard: Go to **Security** > **Page Shield**.
@@ -52,6 +68,8 @@ The All Reported Connections and All Reported Scripts dashboards show all the de
5268
4. Select **View all scripts** or **View all connections**.
5369
5. Review the information displayed in the dashboard.
5470

71+
</Steps>
72+
5573
You can filter the data in these dashboards using different criteria, and print a report with the displayed records.
5674

5775
## View details
@@ -60,7 +78,21 @@ You can filter the data in these dashboards using different criteria, and print
6078
Only available to customers on Business and Enterprise plans.
6179
:::
6280

63-
To view the details of an item, select **Details** next to it.
81+
To view the details of an item:
82+
83+
<Steps>
84+
85+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
86+
87+
2. Go to the client-side resources page:
88+
- Old dashboard: Go to **Security** > **Page Shield**.
89+
- New security dashboard: Go to **Security** > **Web assets** > **Client-side resources** tab.
90+
91+
3. Select **Scripts**, **Connections**, or **Cookies** (the available options depend on your plan).
92+
93+
4. Next to a script, connection, or cookie in the list, select **Details**.
94+
95+
</Steps>
6496

6597
### Script and connection details
6698

@@ -116,6 +148,8 @@ Use this feature to extract data from Page Shield that you can review and annota
116148

117149
To export script, connection, or cookie information in CSV format:
118150

151+
<Steps>
152+
119153
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
120154
2. Go to the client-side resources page:
121155
- Old dashboard: Go to **Security** > **Page Shield**.
@@ -124,3 +158,5 @@ To export script, connection, or cookie information in CSV format:
124158
3. Select **Scripts**, **Connections**, or **Cookies**.
125159
4. (Optional) Apply any filters to the displayed data.
126160
5. Select **Download CSV**.
161+
162+
</Steps>

src/content/docs/page-shield/detection/review-changed-scripts.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ head: []
77
description: Learn how to review scripts on your domain after receiving a code change alert.
88
---
99

10+
import { Steps } from "~/components";
11+
1012
:::note
1113
Available as a paid add-on for customers on an Enterprise plan.
1214
:::
@@ -17,10 +19,13 @@ You can configure a notification for [code change alerts](/page-shield/alerts/al
1719

1820
When you receive such a notification:
1921

22+
<Steps>
23+
2024
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
2125
2. Go to the client-side resources page:
22-
2326
- Old dashboard: Go to **Security** > **Page Shield**.
2427
- New security dashboard: Go to **Security** > **Web assets** > **Client-side resources** tab.
2528

2629
3. Check the details of each changed script and validate if it is an expected change.
30+
31+
</Steps>

src/content/docs/page-shield/detection/review-malicious-scripts.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: Learn how to review scripts and connections that Page Shield
88
considered malicious.
99
---
1010

11-
import { Render } from "~/components";
11+
import { Render, Steps } from "~/components";
1212

1313
:::note
1414
Only available to Enterprise customers with a paid add-on.
@@ -20,6 +20,8 @@ Cloudflare displays scripts and connections considered malicious at the top of t
2020

2121
To review the scripts considered malicious:
2222

23+
<Steps>
24+
2325
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
2426

2527
2. Go to the client-side resources page:
@@ -41,12 +43,16 @@ To review the scripts considered malicious:
4143

4244
5. Based on the displayed information, and with the help of the [last seen/first seen fields in the script details](/page-shield/detection/monitor-connections-scripts/#view-details), review and update the pages where the malicious script was detected.
4345

46+
</Steps>
47+
4448
You can configure alerts for detected malicious scripts. Refer to [Alerts](/page-shield/alerts/) for more information.
4549

4650
## Review malicious connections
4751

4852
To review the connections considered malicious:
4953

54+
<Steps>
55+
5056
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
5157

5258
2. Go to the client-side resources page:
@@ -63,3 +69,5 @@ To review the connections considered malicious:
6369
For more information, refer to [Malicious script and connection detection](/page-shield/how-it-works/malicious-script-detection/).
6470

6571
5. Based on the displayed information, and with the help of the [last seen/first seen fields in the connection details](/page-shield/detection/monitor-connections-scripts/#view-details), review and update the pages where the malicious connection was detected.
72+
73+
</Steps>

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

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,56 @@ head:
99
description: Learn how to get started with client-side resource monitoring.
1010
---
1111

12-
import { Tabs, TabItem, Render } from "~/components";
12+
import { Tabs, TabItem, Render, Steps } from "~/components";
1313

1414
## Activate client-side resource monitoring
1515

1616
To enable client-side resource monitoring:
1717

1818
<Tabs syncKey="dashNewNav"> <TabItem label="Old dashboard">
1919

20+
<Steps>
21+
2022
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
2123
2. Go to **Security** > **Page Shield**.
2224
3. Select **Enable Page Shield**.
2325

26+
</Steps>
27+
2428
If you do not have access to Page Shield in the Cloudflare dashboard, check if your user has one of the [necessary roles](/page-shield/reference/roles-and-permissions/).
2529

2630
</TabItem> <TabItem label="New dashboard" icon="rocket">
2731

32+
<Steps>
33+
2834
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
2935
2. Go to **Security** > **Settings** and filter by **Client-side abuse**.
3036
3. Turn on **Continuous script monitoring**.
3137

38+
</Steps>
39+
3240
If you do not have access to resource monitoring in the Cloudflare dashboard, check if your user has one of the [necessary roles](/page-shield/reference/roles-and-permissions/).
3341

3442
</TabItem> </Tabs>
3543

36-
## Review detected scripts
44+
## Review detected resources
3745

3846
When you enable client-side resource monitoring, it may take a while to get the list of detected scripts in your domain.
3947

40-
Review the scripts displayed in the [resource monitoring dashboard](/page-shield/detection/monitor-connections-scripts/), checking them for signs of malicious activity.
48+
To review the scripts detected by Cloudflare:
49+
50+
<Steps>
51+
52+
1. Go to the client-side resources page:
53+
- Old dashboard: Go to **Security** > **Page Shield**.
54+
- New security dashboard: Go to **Security** > **Web assets** > **Client-side resources** tab.
55+
56+
2. Review the list of detected scripts, checking for any unknown or unexpected scripts.<br/>
57+
[Depending on your plan](/page-shield/#availability), Cloudflare will also:
58+
- Inform you if a script is [considered malicious](/page-shield/how-it-works/malicious-script-detection/).
59+
- [Show the details](/page-shield/detection/monitor-connections-scripts/#script-and-connection-details) about each detected script.
60+
61+
</Steps>
4162

4263
Depending on your plan, you may be able to also review the connections made by scripts in your domain's pages and check them for malicious activity.
4364

@@ -48,7 +69,7 @@ Depending on your plan, you may be able to also review the connections made by s
4869
product="page-shield"
4970
params={{
5071
availabilityDetails:
51-
"The available alert types depend on your Cloudflare plan.",
72+
"The [available alert types](/page-shield/alerts/alert-types/) depend on your Cloudflare plan.",
5273
}}
5374
/>
5475

@@ -60,12 +81,30 @@ Depending on your plan, you may be able to also review the connections made by s
6081
Only available to Enterprise customers with a paid add-on.
6182
:::
6283

63-
[Policies](/page-shield/policies/), called content security rules in the [new security dashboard](/security/), define allowed resources on your websites. Create policies to implement a positive security model [^1].
84+
[Policies](/page-shield/policies/)called content security rules in the [new security dashboard](/security/)define allowed resources on your websites. Create policies to implement a positive security model[^1].
6485

65-
1. [Create a policy](/page-shield/policies/create-dashboard/) with the _Log_ action.
86+
[^1]: A positive security model is one that defines what is allowed and rejects everything else. In contrast, a negative security model defines what will be rejected and accepts the rest.
6687

67-
2. After some time, [review the list of policy violations](/page-shield/policies/violations/) to make sure the policy is correct. Update the policy if needed.
88+
### 1. Create a policy with the Log action
6889

69-
3. Change the policy action to _Allow_ to start blocking resources not covered by the policy.
90+
When you create a policy with the [_Log_ action](/page-shield/policies/#policy-actions), Cloudflare logs any resources not covered by the policy, without blocking any resources. Use this action to validate a new policy before deploying it.
7091

71-
[^1]: A positive security model is one that defines what is allowed and rejects everything else. In contrast, a negative security model defines what will be rejected and accepts the rest.
92+
<Render
93+
file="policy-create"
94+
params={{ policyAction: "Log" }}
95+
product="page-shield"
96+
/>
97+
98+
### 2. Review policy violations
99+
100+
Resources not covered by the policy you created will be reported as [policy violations](/page-shield/policies/violations/). After some time, review the list of policy violations to make sure the policy is correct.
101+
102+
<Render file="policy-review-violations" product="page-shield" />
103+
104+
Update the policy if needed.
105+
106+
### 3. Change policy action to Allow
107+
108+
Once you have verified that your policy is correct, change the policy action from _Log_ to _Allow_.
109+
110+
When you use the [_Allow_ action](/page-shield/policies/#policy-actions), Cloudflare starts blocking any resources not explicitly allowed by the policy.

0 commit comments

Comments
 (0)