Summary
redactPii() in src/core/AsyncLogWriter.cpp has grown one regex at a time as log sites were added. Its coverage and its tests should be brought in line with the fields the app now logs, and the rule set should be easier to extend than hand-written lookbehinds.
Follow-up from the review discussion on #5130 (the exe= path line), which noted that the redactor has no rule for filesystem paths and that the existing path-logging sites predate it.
Scope
Rules to add, each with a case in tests/async_log_writer_test.cpp:
Structure:
Not in scope
- Changing any individual log site; the fix belongs in the redactor so existing sites are covered together
SettingsSanitizer (already policy-driven)
Verification
Summary
redactPii()insrc/core/AsyncLogWriter.cpphas grown one regex at a time as log sites were added. Its coverage and its tests should be brought in line with the fields the app now logs, and the rule set should be easier to extend than hand-written lookbehinds.Follow-up from the review discussion on #5130 (the
exe=path line), which noted that the redactor has no rule for filesystem paths and that the existing path-logging sites predate it.Scope
Rules to add, each with a case in
tests/async_log_writer_test.cpp:~(handle both slash styles on Windows, and a/home/<user>orC:\Users\<user>segment whenQDir::homePath()differs from the path's actual root, e.g. Flatpak or elevated runs)user <name>/username=style fields (seeIcomSession.cppcontrol-stream login line)connecting to/connected to/pin forkeywords (WanConnection, MqttClient, PgxlConnection)Structure:
{keyword, keep-prefix}table the patterns are generated from, mirroring howSettingsSanitizerkeys offSettingsCredentialPolicy, so a new field is one table row and one testdocs/listing what the redactor does and does not scrub, so reviewers can check a new log site against itNot in scope
SettingsSanitizer(already policy-driven)Verification
async_log_writer_testandissue_report_testpass with the new cases~\AppData\...for the feat(tci): log the process behind local TCI clients. Principle VIII. #5130exe=line