Repository navigation
[2119 by GPT-5.6 Sol] Desktop renderer CSP: restrict cleartext transport to loopback (retry) - #2120
Conversation
…xt transport Implemented by ProPR AI using gpt-5.6-sol model. Implementation completed successfully.
|
/ultrafix goal=9 max=3 |
|
🔄 Ultrafix loop started (goal: 9/10, max cycles: 3) First action:
|
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-5.6-solOverall EvaluationThis PR substantially narrows production renderer CSP access, but it needs minor, mandatory changes before merge. The policy lifecycle is not synchronized with persisted or directly selected profiles, and four current Windows checks are also failing. ✅ Canonical cleartext allowlisting — ✅ Pre-script policy injection — Packaged HTML is rewritten by the custom protocol before renderer scripts execute, while the session response header uses the same policy callback. ✅ Strong normalization coverage — Tests cover localhost variants, full IPv4 Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Policy misses active-profile transitions
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Exercise the packaged protocolAdd an integration test that serves ScoreThe CSP construction is careful and well tested at the unit level, but incomplete policy-state synchronization is a functional and security regression in the changed behavior. The four current Windows check failures further prevent merge readiness. Score: 5/10 🤖 Review Details
🤖 Review by ProPR |
|
/fix F1 |
|
✅ Applied the requested follow-up changes in commit bce63a7
Summary of ChangesImplemented F1 only.
Validation:
🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Implemented F1 only. - Seeds packaged renderer policy from the persisted active profile before initial window load. - Reconciles and reloads policy after profile save/edit, set-active, removal, clearing, and activation. - Added focused startup and transition coverage. Validation: - Desktop tests: 480 passed, 25 skipped, 0 failed. - Desktop typecheck passed. - Linux x64 packaging and artifact inspection passed. - `git diff --check` passed. - No visual preview created; this is not user-visible. - Changes were not committed, as requested. PR: #2120 Comment by: @integry (ID: 5545646008) Model: gpt-5.6-sol
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-5.6-solOverall EvaluationThe PR substantially improves the packaged renderer CSP by replacing scheme-wide cleartext access with normalized, profile-specific HTTP/WS sources. However, it needs minor changes before merge: two state-synchronization paths can leave the installed CSP out of sync with the active profile. The current ✅ Exact cleartext allowlisting — ✅ Secure transport preserved — Production retains scheme-wide HTTPS/WSS support while removing scheme-wide HTTP/WS access. ✅ Strong normalization coverage — Tests cover localhost subdomains, the full supported Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F2: 🔴 Discard leaves stale CSP access
F3: 🔴 Activation can overwrite newer policy state
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Prefer behavioral startup coverageThe new startup test in ScoreThe core CSP restriction and normalization are well implemented, but two active-state transitions can leave stale cleartext permissions, and one authoritative packaged check is currently failing. Score: 6/10 🤖 Review Details
🤖 Review by ProPR |
|
/fix F2 F3 Also include these independently verified parts of the same lifecycle correction:
|
|
✅ Applied the requested follow-up changes in commit fece985
Summary of ChangesImplemented F2 and F3, scoped to the selected findings.
Validation:
🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Implemented F2 and F3, scoped to the selected findings. - Successful explicit and rollback discards now reconcile the persisted active profile, removing stale loopback HTTP/WS CSP sources. - Activation reconciles current state after cookie clearing, preventing older activations from overwriting newer mutations. - Policy callbacks are origin-only; delayed reloads resolve the current main renderer and discard superseded generations. - Pinned packaged smoke policies no longer install dynamic reconciliation or trigger extra `listProfiles()` reads. - Added focused concurrency, discard, rollback, renderer-replacement, and smoke-policy coverage. Validation: - Focused lifecycle/security tests: 42 passed. - Packaged Connect lifecycle/platform tests: 70 passed. - Desktop TypeScript check passed. - Linux-x64 package and artifact inspection passed. - Native Packaged Connect journey attempt was blocked by this container lacking Xvfb/keyring support and root-owned Chrome sandbox setup. Darwin and arm64 targets require their target-native CI runners. - No visual preview generated; this change is not visually perceptible. PR: #2120 Comment by: @integry (ID: 5545794678) Model: gpt-5.6-sol
|
/fix Complete the remaining CSP lifecycle gaps on fece985:
|
|
ℹ️ No authorized review findings were selected. No files were changed because this Processing comment ID: 5545902141✓ |
|
Complete the remaining CSP lifecycle gaps on fece985:
|
|
✅ Applied the requested follow-up changes in commit 1f4f3bf Summary of ChangesImplemented the remaining CSP lifecycle fixes:
Changed files: main.ts, ipc.ts, ipc-lifecycle.test.ts, and smoke-test-authorization.test.ts. Validation:
The four target-native Darwin/Linux journeys could not be run on this Linux x64 runner: Darwin x64/arm64 and Linux arm64 require their native CI runners, while the local Linux journey also lacks Xvfb and gnome-keyring. No preview was created because the changes are not visually perceptible. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Implemented the remaining CSP lifecycle fixes: - Smoke policy pinning now derives from transport smoke, Connect journey endpoint, or an authorized packaged smoke profile origin. - Successful `authenticationPair` calls now await pairing and reconcile authoritative active-profile state. - Added changed-origin active re-pair coverage expecting `null`. - Corrected the origin-changing profile-save test to reconcile `null`. - Preserved F2/F3 concurrency and current-renderer behavior. Changed files: [main.ts](/tmp/git-processor/worktrees/integry/propr/pr-2120-followup-2026-09-04T20-10-36/apps/desktop/src/main.ts:1169), [ipc.ts](/tmp/git-processor/worktrees/integry/propr/pr-2120-followup-2026-09-04T20-10-36/apps/desktop/src/ipc.ts:168), [ipc-lifecycle.test.ts](/tmp/git-processor/worktrees/integry/propr/pr-2120-followup-2026-09-04T20-10-36/apps/desktop/src/ipc-lifecycle.test.ts:25), and [smoke-test-authorization.test.ts](/tmp/git-processor/worktrees/integry/propr/pr-2120-followup-2026-09-04T20-10-36/apps/desktop/src/smoke-test-authorization.test.ts:172). Validation: - Focused lifecycle tests: 23 passed. - Desktop typecheck: passed. - Full desktop suite: 485 passed, 25 platform-specific skipped. - Linux x64 package and packaged artifact/fuse inspection: passed. - `git diff --check`: passed. The four target-native Darwin/Linux journeys could not be run on this Linux x64 runner: Darwin x64/arm64 and Linux arm64 require their native CI runners, while the local Linux journey also lacks Xvfb and gnome-keyring. No preview was created because the changes are not visually perceptible. PR: #2120 Comment by: @integry (ID: 5545905906) Model: gpt-5.6-sol
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-5.6-solOverall EvaluationThis PR substantially improves packaged-renderer CSP by replacing scheme-wide cleartext access with normalized loopback origins and synchronizing policy changes with profile lifecycle operations. It needs a localized security correction before merge; 23 checks also remain pending. ✅ Exact cleartext scoping — ✅ Safe renderer replacement — The generation-based reloader resolves the current ✅ Smoke-policy isolation — Transport, Connect-journey, and authorized profile smoke modes preserve their seeded policies without installing dynamic reconciliation. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F4: 🔴 Reconciliation failures retain stale origins
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Add executable smoke pinning testsThe smoke authorization tests inspect ScoreThe core CSP design and lifecycle coverage are strong, but the post-commit failure path can leave a stale cleartext origin installed and must be made fail-closed. Current checks report no failures, although most remain pending. Score: 6/10 🤖 Review Details
🤖 Review by ProPR |
|
/fix F4 |
|
✅ Applied the requested follow-up changes in commit d85fd53
Summary of ChangesImplemented F4 only.
Validation:
🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Implemented F4 only. - Reconciliation now publishes `null` when the authoritative profile read fails, clearing stale cleartext CSP origins before rethrowing. - Added a post-save commit regression test verifying the callback receives `null`. - No visual preview generated; behavior is not user-visible. Validation: - Desktop typecheck passed. - Desktop suite: 486 passed, 25 skipped, 0 failed. - `git diff --check` passed. - Changes were not committed, as requested. PR: #2120 Comment by: @integry (ID: 5546036208) Model: gpt-5.6-sol
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-5.6-solOverall EvaluationThe PR substantially improves packaged-renderer CSP handling, but it needs a small correctness fix before merge because concurrent reconciliation reads can publish stale policy state. ✅ Exact cleartext scoping — Production CSP generation removes scheme-wide HTTP/WS access and admits only normalized loopback HTTP origins and their corresponding WebSocket origins. ✅ Fail-closed lifecycle handling — Startup initializes the policy before window creation, smoke policies remain pinned, and failed authoritative reads clear the dynamic policy. ✅ Renderer-safe reloads — Delayed reloads resolve the current Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F5: 🔴 Stale reconciliation can win
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Prefer behavioral smoke coverageThe smoke authorization tests inspect ScoreThe core security design and most lifecycle transitions are well implemented, but the out-of-order reconciliation race can leave the renderer with a stale cleartext allowlist or block its actual active endpoint. Pending checks should also complete after the localized correction. Score: 6/10 🤖 Review Details
🤖 Review by ProPR |
|
/fix F5 |
|
✅ Applied the requested follow-up changes in commit c0bcb4c
Summary of ChangesImplemented F5 only.
Verification:
No visual preview was created because this change is not user-visible. No commit was made. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Implemented F5 only. - Added a monotonic reconciliation generation in [ipc.ts](/tmp/git-processor/worktrees/integry/propr/pr-2120-followup-2026-09-04T20-34-37/apps/desktop/src/ipc.ts:85). - Stale successful reads and stale failures can no longer overwrite the latest renderer policy. - Added race tests covering both delayed resolution and rejection in [ipc-lifecycle.test.ts](/tmp/git-processor/worktrees/integry/propr/pr-2120-followup-2026-09-04T20-34-37/apps/desktop/src/ipc-lifecycle.test.ts:135). Verification: - IPC lifecycle tests: 17 passed - Desktop TypeScript check: passed - `git diff --check`: passed No visual preview was created because this change is not user-visible. No commit was made. PR: #2120 Comment by: @integry (ID: 5546142663) Model: gpt-5.6-sol
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-5.6-solOverall EvaluationThe PR substantially improves packaged-renderer CSP isolation, but it needs one localized error-path correction before merge. Current checks have no reported failures, though most remain pending. ✅ Exact cleartext scoping — Production CSP generation admits only normalized loopback HTTP origins and their corresponding WebSocket origins. ✅ Authoritative lifecycle updates — Successful profile mutations reconcile against persisted active-profile state, with generation guards preventing stale reads from publishing obsolete policies. ✅ Smoke policy stability — Transport, Connect journey, and authorized profile smoke modes retain pinned policies without additional profile reads or dynamic callbacks. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F6: 🔴 Reconcile when activation rollback fails
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe main security design and normal lifecycle handling are strong, but the uncovered post-commit failure path can leave the new CSP state inconsistent and must be corrected before merge. Score: 6/10 🤖 Review Details
🤖 Review by ProPR |
5f168b9
into
1953-epic-desktop-transport-api
AI Implementation Summary
Closes #2119
Branch:
2119/gpt-5.6-sol-desktop-renderer-csp-rest-20260904-1923-yozCommits: ✅ Changes committed (d57b96e)
AI Processing Completed
Execution Details:
Summary:
Implemented GitHub issue #2119.
Key changes:
http:andws:renderer access..localhost, full IPv4127/8, IPv6 loopback, remote HTTPS/WSS, LAN hosts, and deceptive hostname forms.Validation:
DISPLAY; CI providesxvfb-run.Detailed Logs:
01a06de0-d04c-7520-9a84-07305ae6210fLog files stored at:
/tmp/claude-logs/issue-2119-2026-09-04T19-32-52-350Z-conversation.json/tmp/claude-logs/issue-2119-2026-09-04T19-32-52-350Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #2119.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!