feat(pii): add data collection for HTTP requests#2167
Closed
Litarnus wants to merge 3 commits into
Closed
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 65482dd. Configure here.
| } | ||
|
|
||
| return $scrubbed; | ||
| } |
There was a problem hiding this comment.
Scrubber skips nested sensitive keys
Medium Severity
scrubKeyValueData only inspects top-level keys and copies nested array values unchanged. Sensitive nested keys (for example PHP array cookies like user[password]) are therefore left intact, despite this class being introduced for recursive scrubbing that framework SDKs are expected to reuse.
Reviewed by Cursor Bugbot for commit 65482dd. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Introduces new classes to support data collection and separate logic of what is collected with how its collected.
Pii/scrubbing logic was deliberately moved into own classes so that framework SDKs can use them and rely on a strong testing harness instead of having to reimplement similar behaviour and tests
RequestDataCollector
This acts as an abstraction layer with the configuration to produce the desired result based on the provided config. It will always use
sendDefaultPiiunless data collection was explicitly set (opt-in).Having this class makes testing easier as well as the code in the RequestIntegration more readable, since it can just focus on what to collect instead of dealing with two distinct types of settings.
Also makes removal of the legacy value more easier.
SensitiveDataScrubber
Generic class to perform recursive scrubbing based on the provided behaviour config.