Repository navigation
Fix: Prevent private backup metadata leaks - #9
Merged
Merged
Conversation
sachk
force-pushed
the
fix-privacy-sanitization
branch
from
August 3, 2026 09:29
5f58173 to
6f6f0d8
Compare
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.
Dependency
This is a stacked PR and depends on #6.
The branch is currently based on commit
040b1a2from #6 because thischange reuses the centralized
smartswitch_core.path_safetyimplementation.As a result, the PR currently includes the commits from #6 in its history.
It should not be merged before #6. After #6 is merged, this branch will be
rebased onto the updated
mainso that only the privacy changes remain inthis PR's diff.
The privacy-specific commit is
5f58173.Problem
SmartSwitch Explorer could expose local or backup-related information through
several secondary code paths:
SmartSwitchBackup.json.spaces or UNC paths.
and be exported, despite potentially containing IMEI values, email addresses,
device identifiers, session credentials, or other private metadata.
shutdown.
Solution
This PR:
SourceFilespaths with a non-sensitive file count;write_manifest;anonymization;
output paths;
Fix authenticated extraction of Smart Switch APKFILE data backups #6 instead of maintaining a second implementation.
The privacy filtering deliberately favors redaction over preserving the
remainder of a diagnostic line once an absolute path is detected.
Validation
104 passed, 2 skipped
The two skipped tests are optional real-backup tests because
SMARTSWITCH_REAL_DATA was not set.
All local PR branches were also checked with git merge-tree. After rebasing
onto #6, no merge conflicts remain with:
No real backup, .data, .penc, log, credential, absolute personal path, or
private fixture is included in this PR.
AI disclosure
This PR, including its implementation, tests, commit message, technical
analysis, and description, was generated with OpenAI Codex. The generated
changes and test results were reviewed and validated locally by the AI coding
agent. No private backup data was provided to an external service.