Skip to content

fix(browser): redact typed values from automatic Browser2 snapshots#511

Open
shaun0927 wants to merge 1 commit into
rowboatlabs:devfrom
shaun0927:fix/browser2-redact-input-values
Open

fix(browser): redact typed values from automatic Browser2 snapshots#511
shaun0927 wants to merge 1 commit into
rowboatlabs:devfrom
shaun0927:fix/browser2-redact-input-values

Conversation

@shaun0927

@shaun0927 shaun0927 commented Apr 17, 2026

Copy link
Copy Markdown

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.ts
    • add isTextEntryElement() to distinguish controls whose live values should not be used as labels
    • add shouldRedactVerificationValue() to suppress verification values for text-entry controls
    • stop using .value as the fallback label for text-entry controls
    • keep non-secret metadata (selector, role, placeholder, disabled, etc.) available for automation flows

Why 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

  1. cd apps/x && pnpm install && pnpm run deps
  2. cd apps/main && npm run build
  3. Re-ran the local fixture validation after the patch:
ROWBOAT_REDACTION_RECHECK {"labels":[{"id":"email","type":"email","label":null,"rawValue":"alice@example.com"},{"id":"pwd","type":"password","label":null,"rawValue":"super-secret-password"},{"id":"notes","type":"textarea","label":null,"rawValue":"confidential draft"}],"passwordVerification":{"selector":"#pwd","descriptor":"input","text":null,"checked":null,"value":null,"selectedIndex":null,"open":null,"disabled":false,"active":false,"ariaChecked":null,"ariaPressed":null,"ariaExpanded":null}}

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant