Skip to content

Desktop: lock down and test the packaged app - #407

Merged
priethor merged 9 commits into
mainfrom
priethor/desktop-shell-hardening
Jul 31, 2026
Merged

Desktop: lock down and test the packaged app#407
priethor merged 9 commits into
mainfrom
priethor/desktop-shell-hardening

Conversation

@priethor

@priethor priethor commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

What

Follow-up to #397 and #403.

Embedded web content now gets only the Electron permissions Cortext needs. Fullscreen still works for HTTPS embeds, while access to the camera, microphone, screen capture, location, clipboard reads, and connected devices is blocked. Packaged builds also hide DevTools and disable unused Node and inspector entry points.

Buildkite now checks and opens the signed and notarized .app before uploading it. This verifies its security fuses and bundled runtime files, then checks startup, local runtime authentication, second-instance handling, and clean shutdown.

Why

Cortext loads web embeds inside Electron, so the app should grant only the permissions they need.

Our current E2E tests run Electron from source and cannot catch failures that only affect the packaged app. Signing and notarization do not prove that the .app starts, so CI should open it before uploading it.

How

  • Serving loading and error pages through a private scheme so packaged builds do not need privileged file:// access.
  • Connecting the packaged smoke test only to the renderer over loopback CDP, without enabling the Node inspector.

Testing Instructions

  1. Install the macOS artifact from CI and open Cortext with a fresh profile. Confirm that the workspace and editor canvas load.
  2. Open the View menu. Confirm that reload, zoom, and fullscreen are available, but "Toggle Developer Tools" is not.
  3. Open an HTTPS video embed and enter fullscreen. Quit Cortext, reopen it, and confirm that it starts normally.

I used Claude to help implement these changes. I guided the work, then tested and reviewed the result.

@priethor priethor closed this Jul 31, 2026
@priethor
priethor deleted the priethor/desktop-shell-hardening branch July 31, 2026 11:12
@priethor
priethor restored the priethor/desktop-shell-hardening branch July 31, 2026 11:12
@priethor priethor reopened this Jul 31, 2026
@priethor priethor added area: desktop Desktop app, PHP runtime, snapshots, and desktop packaging. type: enhancement Improvement to existing behavior. labels Jul 31, 2026
@priethor
priethor marked this pull request as ready for review July 31, 2026 11:37
@priethor
priethor merged commit 89761a6 into main Jul 31, 2026
16 checks passed
@priethor
priethor deleted the priethor/desktop-shell-hardening branch July 31, 2026 11:38
@github-actions github-actions Bot added this to the 0.2.0 milestone Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: desktop Desktop app, PHP runtime, snapshots, and desktop packaging. type: enhancement Improvement to existing behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant