Audit Onyx export: extend key export rules for complete coverage#91217
Draft
MelvinBot wants to merge 1 commit into
Draft
Audit Onyx export: extend key export rules for complete coverage#91217MelvinBot wants to merge 1 commit into
MelvinBot wants to merge 1 commit into
Conversation
Every ONYXKEYS entry (top-level + COLLECTION) is now explicitly categorized into one of three buckets: 1. ONYX_KEY_EXPORT_RULES — keys with per-field allow/mask lists 2. safeOnyxKeys — keys safe to export as-is (booleans, IDs, config) 3. onyxKeysToRemove — keys that must never leave the device Key changes: - Add COLLECTION.REPORT_ACTIONS explicit rule preserving debug fields (actionName, reportActionID, created, actorAccountID, pendingAction, errors) while masking message content - Add wildcard allowList (['*']) support for pass-through rules - Add safeOnyxKeys set for ~120 boolean/config/ID keys - Expand onyxKeysToRemove with additional sensitive keys - Add enforcement test that fails when a new ONYXKEYS entry is added without being categorized in one of the three buckets - FORMS use maskFragileData fallback (dynamic user-entered fields) - DERIVED keys remain fully removed Co-authored-by: mkhutornyi <mkhutornyi@users.noreply.github.com>
4 tasks
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.
Explanation of Change
Audits and extends the Onyx export key rules so every
ONYXKEYSentry (top-level +COLLECTION.*) is explicitly categorized into one of three buckets:ONYX_KEY_EXPORT_RULES— keys with per-fieldallowList/maskListfor PII-aware exportsafeOnyxKeys— keys safe to export as-is (booleans, IDs, config, timestamps)onyxKeysToRemove— keys that must never leave the device (tokens, credentials, raw server data)Key changes:
COLLECTION.REPORT_ACTIONSexplicit rule — preserves debug-useful fields (actionName,reportActionID,created,actorAccountID,pendingAction,errors, etc.) while masking message content (message,originalMessage,avatar,person)allowList: ['*']support — for keys likeTRANSACTION_VIOLATIONSandPOLICY_CATEGORIESthat are completely safe and useful for debuggingsafeOnyxKeys— boolean flags, loading states, feature flags, simple IDs, and config values that contain no PIIonyxKeysToRemove— addedPRESERVED_USER_SESSION,PRESERVED_ACCOUNT,MAPBOX_ACCESS_TOKEN,RAM_ONLY_WALLET_ONFIDO,ONYX_UPDATES_FROM_SERVER,QUEUE_FLUSHED_DATAPRIVATE_PERSONAL_DETAILS,LOGIN_LIST,PLAID_DATA,FUND_LIST,REPORT_DRAFT,TRANSACTION_DRAFT,WORKSPACE_CARDS_LIST, etc.ONYXKEYSentry is added without being categorized in one of the three bucketsmaskFragileDatafallback (dynamic user-entered fields with varying structure)Fixed Issues
$ #90977
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
N/A — this change only affects the Onyx state export logic (Settings → Troubleshoot → Export Onyx state). No network-dependent behavior is modified.
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — no UI changes
Android: mWeb Chrome
N/A — no UI changes
iOS: Native
N/A — no UI changes
iOS: mWeb Safari
N/A — no UI changes
MacOS: Chrome / Safari
N/A — no UI changes