Skip to content

ui-react: malformed trust-settings reads unmount Settings and capability flags accept truthy non-booleans #4442

Open

Description

@schlessera

Out of scope

Changing trusted publication authority, removing supported Settings controls, or treating malformed data as a valid empty policy.

Context

Parent epic: #3597. Deferred hardening from the independent review of #4441 at aab2560776a4a32f6966b476decb1272412bd996.

F1: List fields are read without structural guards (selectionMatches, packages/ui-react/src/components/settings/trust-settings-section.tsx:30; rule editing at line 179; list rendering at lines 254-257). Missing or malformed origins, repositories, or rules can therefore unmount Settings. No shipped host omits these fields. A malformed response should use the existing “Trust settings unavailable” path and preserve the Settings frame.

F2: Production capability normalization currently requires explicit === true at packages/ui-react/src/components/settings/trust-settings-section.tsx:81-86. Current tests cover an absent capabilities object and missing originRules, but a mutation to !!data.capabilities?.x survives. A truthy non-boolean response such as "false" or 1 needs behavioral coverage to pin the strict requirement.

Scope

Validate trust list collections before rendering or editing them and pin strict capability interpretation at the browser boundary.

Acceptance criteria

  • Missing, non-array, or otherwise malformed trust list collections degrade to the existing “Trust settings unavailable” state; Settings remains mounted and unconfirmed policy facts do not authorize writes.
  • A real-browser/component test sends a truthy non-true capability value such as "false" or 1 and proves the corresponding enforcement-dependent action remains disabled.
  • Valid host reads still render normally and recover from a previous malformed read.
  • Mutation receipts show that bypassing list validation and replacing strict capability normalization with truthiness both fail their named tests.

Verification

Run focused trust component and composed Settings layout tests in the pinned real browser, with failing-first and restored mutation receipts, then exact-head preflight.

Contract impact

No new host field or compatibility change is planned; this hardens read validation and the existing conservative missing-capability behavior. Keep required response facts distinct from a valid empty list.

2026-11-23 triage at main a3395c4: verified the cited anchors (selectionMatches line 30, prepare line 179, list rendering lines 254-257 and capability normalization in load lines 81-86 of packages/ui-react/src/components/settings/trust-settings-section.tsx); they hold. Replaced non-manifest type: bug with type: fix; changed priority: p3 to priority: p2, because this hardens shipped read validation and needs no further driving use case, matching sibling #4436.

Activity

  1. added
    area: ui-react
    priority: p3
    on Nov 21, 2026
  2. added
    type: fix
    priority: p2
    agent-ready
    and removed
    priority: p3
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyarea: ui-reactpriority: p2type: fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions