Skip to content

Desktop renderer CSP: restrict cleartext transport to loopback (retry) #2119

Closed

Description

@integry

Retry of #2117 after ProPR task integry-propr-2117-codex-gpt-5.6-sol-52324d1b-de44-4cbb-92dc-654b14fe4eb1 stalled for more than 15 minutes with its container gone, no commit, and no PR. Start from the current transport branch.

Problem

Final review of transport epic PR #2035 at exact head d4226b2 found a renderer security regression (review finding F1, comment 5545248706). apps/desktop/renderer.html broadens connect-src to scheme-wide http: and ws:, which permits arbitrary cleartext remote/LAN destinations. The runtime endpoint validator permits cleartext only for normalized loopback endpoints, while remote instances and ProPR Connect tunnel endpoints use HTTPS/WSS.

Required correction

Tighten the packaged renderer CSP so:

  • remote API/tunnel instances remain supported over https: and wss:;
  • cleartext http: and ws: are allowed only for the supported loopback authorities (localhost, IPv4 loopback, and IPv6 loopback as accepted by the endpoint normalizer), including required development/local ports;
  • arbitrary cleartext remote and LAN hosts are rejected;
  • production renderer, IPC, session permission, credential injection, pairing approval, and navigation boundaries remain fail-closed;
  • no unsafe inline/eval or broad default/connect source is introduced.

Use a static narrowly scoped allowlist if it accurately covers the normalizer; otherwise implement a validated per-profile policy without creating a startup race. Add focused CSP policy coverage proving supported loopback HTTP/WS forms and remote HTTPS/WSS forms pass, while non-loopback cleartext and deceptive hostname forms fail. Preserve Linux/macOS packaging and ProPR Connect tunnel behavior. Windows is out of scope.

Acceptance

Final review F1 is resolved; focused security tests, full suite, CodeQL, Validate Changes, packaged Connect Darwin/Linux x64+ARM64, and unsigned Darwin/Linux x64+ARM64 all pass on the combined transport head.

Activity

  1. propr-dev commented on Sep 4, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-5.6-sol
    • Branch: 2119/gpt-5.6-sol-desktop-renderer-csp-rest-20260904-1923-yoz
    • Base Branch: 1953-epic-desktop-transport-api
    • Worktree: issue-2119-20260904-1923-gpt-5.6-sol-yoz

    🔍 Track Task Execution

  2. added a commit that references this issue on Sep 4, 2026
  3. integry commented on Sep 4, 2026

    @integry
    OwnerAuthor

    Implemented by #2120, merged into 1953-epic-desktop-transport-api (5f168b9). Closing the completed child issue during epic issue/PR reconciliation. Final desktop integration and delivery remain tracked by #1950 / #1970; this does not claim a main-branch release.

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

    AIAI-donebugllm-codex-gpt56-sol

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions