fix(browser): redact typed values from automatic Browser2 snapshots#511
Open
shaun0927 wants to merge 1 commit into
Open
fix(browser): redact typed values from automatic Browser2 snapshots#511shaun0927 wants to merge 1 commit into
shaun0927 wants to merge 1 commit into
Conversation
The page-inspection helpers were using live text-entry values as fallback labels and verification payloads. This patch keeps structural metadata while redacting text-entry controls from automatic labels and verification values so Browser2 snapshots no longer surface typed secrets by default. Constraint: Browser2 still needs stable selectors and non-secret metadata for automation flows Rejected: Strip all verification metadata from form controls | would make click verification significantly less useful Confidence: high Scope-risk: narrow Reversibility: clean Directive: Do not reintroduce control into automatic labels or verification output without an explicit user-initiated inspection mode Tested: pnpm install; pnpm run deps; apps/main npm run build; browser fixture redaction validation via OpenChrome Not-tested: Full end-to-end Electron Browser2 interaction loop
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.
Summary
This is a narrow follow-up to #508.
The Browser2 page-inspection helpers were using live text-entry values as automatic labels and verification payloads. That means unlabeled inputs could expose typed content directly in page-read / verification output, including password values.
This patch keeps selectors and non-secret metadata intact while redacting text-entry controls from automatic labels and verification values.
Related issues
Changes
apps/x/apps/main/src/browser/page-scripts.tsisTextEntryElement()to distinguish controls whose live values should not be used as labelsshouldRedactVerificationValue()to suppress verification values for text-entry controls.valueas the fallback label for text-entry controlsselector,role,placeholder,disabled, etc.) available for automation flowsWhy this scope
I kept the fix intentionally narrow: it only removes automatic exposure of typed values while preserving stable selectors and other non-secret state that Browser2 still needs.
Testing
cd apps/x && pnpm install && pnpm run depscd apps/main && npm run build