Repository navigation
[No QA][Fullstory] Add a masking guide and review rule for sensitive fields - #107166
Conversation
|
@thesahindia Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
mountiny
left a comment
There was a problem hiding this comment.
FormProvider doesn't mask a form that turns off its scroll view
The guide (FULLSTORY.md:63) and the PRIVACY-1 rule (line 58) say that passing forwardedFSClass to FormProvider masks the whole form. That isn't true when the form sets shouldUseScrollView={false}. In that case FormWrapper returns early without the FSClassView, so the class is dropped and the inputs fall back to fs-unmask.
So a new form like <FormProvider shouldUseScrollView={false} forwardedFSClass={CONST.FULLSTORY.CLASS.MASK}> would record its inputs unmasked. The AI reviewer would also let it through, because the rule lists FormProvider as a container that masks.
Nothing leaks today. The only two forms that pass a class to FormProvider (AddressForm and DynamicFormListItemPage) both use the scroll view.
Could you:
- Add this case as a third item under "Limits" in the guide.
- Add the same exception to the
FormProviderpart of the rule's masking conditions.
Fixing FormWrapper itself can be a follow-up. It needs some care, because wrapping the early return in a View would change the layout of the 3 forms that turn off the scroll view.
@mountiny this is being fixed in #107161, commit 33697d1, so probably it's best we hold this PR once that one is done. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.54-0 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.54-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.5.54-6 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Adds a guide on how Fullstory masking works in the App and a review rule so new sensitive fields don't ship unmasked. Several of the gaps we found in the masking audit were fields that lost their mask in later refactors, and nothing documented how masking is wired.
contributingGuides/FULLSTORY.md: what has to be masked, the three classes and why a childfs-unmaskbeats a masked parent, the default class per layer, how text inputs pick their class (useInputFSClass), how to mask withFSClassViewandforwardedFSClass, the masked-by-default sub-steps, content rendered in portals and modals, the native flattening issue, and how to check masking in DevTools and in a real recording.PRIVACY-1rule for the AI reviewer: flags a new input or display of bank, card, identity, personal or 2FA data that isn't masked, including inputs whose only masked ancestor is a plain<View fsClass>.AGENTS.mdand theapp-coding-standardsskill link to both.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/693315
PROPOSAL:
Tests
contributingGuides/FULLSTORY.mdand check its examples and file references against the code:FSClassView,useInputFSClass,isSensitiveInput, theSubStepFormsdefaults and thefsClasslint rule inoxlint.config.mts.TextInputfor a routing number inside a plain<View fsClass={CONST.FULLSTORY.CLASS.MASK}>, and stage it.AGENTS.mddescribes: a subagent following.claude/agents/code-inline-reviewer.mdongit diff --cached $(git merge-base origin/main HEAD).PRIVACY-1.FSClassViewinstead and run it again: noPRIVACY-1finding.AGENTS.md, the skill'sSKILL.mdand the rule file open the guide and the rule.Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari