Skip to content

bug-report-scrubber

Masks secrets that a bug report’s diagnostics may carry by accident: token shapes of well-known services and the vault and home folder paths, which name the user. It is a second wall behind the caller-declared keys redactSettings replaces, and it covers text no key names, such as a BugReportLogBuffer’s entries.

It recognizes shapes, so it is not a promise to find every secret: the user still reviews every section. No pattern uses a lookbehind, which iOS before 16.4 cannot parse.

Interface Description
BugReportScrubbedPath A folder path the scrubber replaces with a placeholder.
ScrubBugReportTextOptions Parameters for scrubBugReportText.
Function Description
getBugReportScrubbedPaths Gets the folder paths a bug report from this device should not name: the vault folder, read from the vault adapter, and on desktop the user’s home folder. A path that cannot be read is left out.
scrubBugReportDiagnosticSections Scrubs the content of each section with scrubBugReportText. The sections are not changed.
scrubBugReportText Masks token shapes and the given folder paths in a bug report’s text. A token becomes [redacted <kind>]; a path becomes its placeholder, whichever separator or letter case the text writes it with.
Type Description
ScrubBugReportDiagnosticSectionsOptions Parameters for scrubBugReportDiagnosticSections.
Variable Description
HOME_PATH_PLACEHOLDER The placeholder of the user’s home folder.
MIN_SCRUBBED_PATH_LENGTH The shortest folder path the scrubber replaces.
VAULT_PATH_PLACEHOLDER The placeholder of the vault folder.