Skip to content

Commit 1c22b68

Browse files
committed
ref(pii): update fields that are scrubbed by default. Remove incorrect examples
1 parent af4f425 commit 1c22b68

File tree

2 files changed

+44
-26
lines changed

2 files changed

+44
-26
lines changed

docs/security-legal-pii/scrubbing/advanced-datascrubbing.mdx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ Sentry does not know if a local variable that looks like a credit card number ac
7676
Selectors allow you to restrict rules to certain parts of the event. This is useful to unconditionally remove certain data by event attribute, and can also be used to conservatively test rules on real data. A few examples:
7777

7878
- `**` to scrub [all default event PII fields](/security-legal-pii/scrubbing//server-side-scrubbing/event-pii-fields/) (other fields, like the span description, require specific selectors)
79-
- `$error.value` to scrub in the exception message
8079
- `$message` to scrub the event-level log message
8180
- `extra.'My Value'` to scrub the key `My Value` in "Additional Data"
8281
- `extra.**` to scrub everything in "Additional Data"
@@ -104,31 +103,6 @@ For example, what is called "Additional Data" in the UI is called `extra` in the
104103
[Remove] [Anything] from [extra.foo]
105104
```
106105

107-
Another example. Sentry knows about two kinds of error messages: the exception message, and the top-level log message. Here is an example of how such an event payload as sent by the SDK (and downloadable from the UI) would look like:
108-
109-
```json
110-
{
111-
"logentry": {
112-
"formatted": "Failed to roll out the dinglebop"
113-
},
114-
"exception": {
115-
"values": [
116-
{
117-
"type": "ZeroDivisionError",
118-
"value": "integer division or modulo by zero"
119-
}
120-
]
121-
}
122-
}
123-
```
124-
125-
Since the "error message" is taken from the `exception`'s `value`, and the "message" is taken from `logentry`, we would have to write the following to remove both from the event:
126-
127-
```
128-
[Remove] [Anything] from [exception.values.*.value]
129-
[Remove] [Anything] from [logentry.formatted]
130-
```
131-
132106
### Boolean Logic
133107

134108
You can combine sources using boolean logic.

src/data/relay_event_pii.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,22 @@
4343
"path": "Event.exceptions.stacktrace.frames.vars",
4444
"additional_properties": false
4545
},
46+
{
47+
"path": "Event.expectct",
48+
"additional_properties": false
49+
},
50+
{
51+
"path": "Event.expectstaple",
52+
"additional_properties": false
53+
},
4654
{
4755
"path": "Event.extra",
4856
"additional_properties": false
4957
},
58+
{
59+
"path": "Event.hpkp",
60+
"additional_properties": false
61+
},
5062
{
5163
"path": "Event.logentry.params",
5264
"additional_properties": false
@@ -83,6 +95,34 @@
8395
"path": "Event.spans.data",
8496
"additional_properties": false
8597
},
98+
{
99+
"path": "Event.spans.data.previous_route.params",
100+
"additional_properties": false
101+
},
102+
{
103+
"path": "Event.spans.data.route.params",
104+
"additional_properties": false
105+
},
106+
{
107+
"path": "Event.spans.sentry_tags.user",
108+
"additional_properties": false
109+
},
110+
{
111+
"path": "Event.spans.sentry_tags.user_email",
112+
"additional_properties": false
113+
},
114+
{
115+
"path": "Event.spans.sentry_tags.user_id",
116+
"additional_properties": false
117+
},
118+
{
119+
"path": "Event.spans.sentry_tags.user_ip",
120+
"additional_properties": false
121+
},
122+
{
123+
"path": "Event.spans.sentry_tags.user_username",
124+
"additional_properties": false
125+
},
86126
{
87127
"path": "Event.stacktrace.frames.vars",
88128
"additional_properties": false
@@ -139,6 +179,10 @@
139179
"path": "Event.user.name",
140180
"additional_properties": false
141181
},
182+
{
183+
"path": "Event.user.sentry_user",
184+
"additional_properties": false
185+
},
142186
{
143187
"path": "Event.user.username",
144188
"additional_properties": false

0 commit comments

Comments
 (0)