-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs(sensitive-data): Overhaul docs around HTTP headers #15616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
93abbcf
40b6461
0a6327d
a1645ee
fa41ef3
7885c84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -13,13 +13,21 @@ In the event that API returns data considered PII, we guard that behind a flag c | |||||
| This is an option in the SDK called [_send-default-pii_](https://docs.sentry.io/platforms/python/configuration/options/#send-default-pii) | ||||||
| and is **disabled by default**. That means that data that is naturally sensitive is not sent by default. | ||||||
|
|
||||||
| Some examples of data guarded by this flag: | ||||||
| Certain sensitive data must never been sent by the SDK, regardless of any config: | ||||||
|
|
||||||
| - HTTP Headers: The keys of known sensitive headers are added, while their values must be replaced with `"[Filtered]"`. | ||||||
| - The SDK performs a **partial, case-insensitive match** against the following headers to determine if they are sensitive: `["auth", "token", "secret", "password", "passwd", "key", "jwt", "bearer", "sso", "saml", "crsf", "xsrf", "credentials"]` | ||||||
|
||||||
| - The SDK performs a **partial, case-insensitive match** against the following headers to determine if they are sensitive: `["auth", "token", "secret", "password", "passwd", "key", "jwt", "bearer", "sso", "saml", "crsf", "xsrf", "credentials"]` | |
| - The SDK performs a **partial, case-insensitive match** against the following headers to determine if they are sensitive: `["auth", "token", "secret", "password", "passwd", "key", "jwt", "bearer", "sso", "saml", "csrf", "xsrf", "credentials"]` |
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Contradictory guidance on HTTP header filtering leads to inconsistent SDK implementations.
Severity: CRITICAL | Confidence: High
🔍 Detailed Analysis
The documentation provides contradictory guidance on HTTP header filtering, specifically regarding the send_default_pii setting. Statement 1 (lines 16-19) mandates unconditional filtering for HTTP headers, while Statement 2 (lines 24-30) describes conditional filtering based on send_default_pii. Furthermore, Statement 3 (lines 44-57) treats cookies (which are HTTP headers) as conditionally filtered. This inconsistency will lead to divergent SDK implementations, where some SDKs might always filter headers, and others might filter them conditionally, resulting in inconsistent data handling across platforms.
💡 Suggested Fix
Clarify whether HTTP header filtering, including cookies, is always unconditional or if it depends on the send_default_pii setting. Ensure all related sections provide a unified and unambiguous rule.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: develop-docs/sdk/expected-features/data-handling.mdx#L16-L30
Potential issue: The documentation provides contradictory guidance on HTTP header
filtering, specifically regarding the `send_default_pii` setting. Statement 1 (lines
16-19) mandates unconditional filtering for HTTP headers, while Statement 2 (lines
24-30) describes conditional filtering based on `send_default_pii`. Furthermore,
Statement 3 (lines 44-57) treats cookies (which are HTTP headers) as conditionally
filtered. This inconsistency will lead to divergent SDK implementations, where some SDKs
might always filter headers, and others might filter them conditionally, resulting in
inconsistent data handling across platforms.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 3516138
Uh oh!
There was an error while loading. Please reload this page.