docs(android): a network filter replaces the built-in redaction; auto-init early window - #69
Merged
Merged
Conversation
Installing a network filter, in code or in the manifest, turns off the default sanitizer (CaptureNetworkUseDefaultSanitizer). From then on the host filter is the only redaction. The SDK works this way by design. - privacy/network: new "A filter replaces the built-in redaction" section. It lists what the default sanitizer redacts (checked against NetworkDataSanitizer), warns that installing a filter turns it off, and shows how to keep it by calling NetworkDataSanitizer.sanitize(event) inside the filter. - network, configuration/overview: point to the section. The option row now says a manifest filter counts too. - privacy/network, logs, breadcrumbs: the manifest sections claimed the filter "is in force from the very first captured event". That is not true on current releases, because the manifest filter is installed on a background thread after capture starts. They now say only what holds: the SDK installs it itself during launch, and with auto-init a filter set in Application.onCreate misses what was captured before the call. They also advise using either the code or the manifest filter, not both. - cspell: allow "apikey". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Change-Id: I79bac610db9fed56d3158acabb58af656da1cc49
Review follow-up: - Clearing the filter turns the default sanitizer back on only if CaptureNetworkUseDefaultSanitizer is still enabled. - The section now notes the URL-encoded replacement (%3Credacted%3E), that key matching is case-insensitive, and that key: value line bodies are covered too. - The manifest pages now say the filter is installed "as part of launch". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Change-Id: I4be5e232aab25b3cb53b335fbf72312762cc23d2
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.
Documents two by-design behaviours of the Android SDK's event filters. Every claim was checked against the SDK source on
bugsee-androidmain; the SDK javadoc change is bugsee/bugsee-android#166.F8: a network filter replaces the built-in redaction
privacy/network.mdx: new section "A filter replaces the built-in redaction". It covers:key: valuebody keys, key-substring families, URL credentials, error messages; case-insensitive;%3Credacted%3Einside URLs);NetworkDataSanitizer.sanitize(event)inside the filter.network.mdx: one bullet pointing to that section.configuration/overview.mdx: theCaptureNetworkUseDefaultSanitizerrow now says a manifest filter counts too.F38: auto-init early window
The manifest sections of
privacy/network.mdx,privacy/logs.mdxandprivacy/breadcrumbs.mdxnow say:Application.onCreate(), and a filter set there in code misses what was captured before the call (for logs, that includes logcat lines read before then);Corrections to an earlier overclaim
All three manifest sections said the filter "is in force from the very first captured event, even under auto-initialization, before any of your own code runs". That is not true on current releases. The manifest filter is installed on a background thread after capture starts, so data from the first moments of launch can be recorded before it is in place. The sentence is replaced with what holds today.
Owner decisions
NetworkDataSanitizerbecomes public API in practice. These docs point hosts atcom.bugsee.library.shared.security.privacy.NetworkDataSanitizer, which sits outsidecom.bugsee.library.contracts.*. Options:set*Filter(...)call (or anullclear) made while launch is installing a manifest filter can be overwritten by it, and the manifest filter then stays until the nextset*Filter(...)call. This never results in unfiltered data. The "not both" advice covers it for now; the SDK fix is open.Held back
This PR describes the released SDK. bugsee/bugsee-android#155 is now merged into
bugsee-androidmain (ed665fce2), and a follow-up for the next SDK release is prepared, held locally ondocs/android-filter-semantics-after-155. It changes two things:nullclear always wins, and using both is fine.It will be published with the SDK release that contains bugsee/bugsee-android#155. The SDK-repo counterpart is bugsee/bugsee-android#166.
Validation
cspell(293 files, 0 issues; addsapikeyandCredactedto the word list) anddocusaurus build(no broken links or anchors).🤖 Generated with Claude Code