Skip to content

fix(security): preserve access while hardening platform boundaries - #1050

Merged
nixuuu merged 3 commits into
devfrom
chore/security-audit-report
Nov 20, 2026
Merged

nixuuu merged 3 commits into
devfrom
chore/security-audit-report

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Change

This update preserves existing access when gateways and workers upgrade and tightens how Canopy issues new credentials, approves connector actions and serves private files.

  • New desktop clients pair with an owner invitation. Previously paired phones, desktops and workers keep their credentials and certificate pins. Revoking a device closes its active streams.
  • MCP approvals bind to the saved account, tool and arguments. Slack deliveries and linked-computer reports check which conversation supplied the data. An older approval with incomplete arguments requires a new decision.
  • Worker file changes and previews are scoped to the thread. Migrations 0180–0184 preserve each owner's existing valid image previews, including historical images with only a saved path and hash. They also migrate connector approvals and confirmed computer redirects.
  • Compose isolates the worker network and runs database migrations separately from the gateway's restricted PostgreSQL login. Web, Android and SSH worker enrollment accept the one-use token through a prompt or stdin.
  • Release jobs check the source revision before using signing or publication credentials. The updater checks the official manifest's repository and tag. Independent manifest signatures still require a publisher key.

Rollout

Update the Compose file together with the gateway and worker images. Existing remote workers using plain HTTP need HTTPS or an explicitly trusted bootstrap origin. Desktop installations that only ever held a worker credential need an owner invitation for UI access.

Configure the protected GitHub environments release-automation, release-signing and release-publication before using the updated release workflows. Move the existing deployment and signing credentials as documented. At PR creation the repository listed only github-pages. Release setup

Verification

  • At 189be698, 238 targeted tests passed across 46 files on top of the merged perf(threads): limit history loading and reuse unchanged views #1049. Six scoped typechecks and lint on the overlapping changes passed.
  • Upgraded the final Linux packages from schema 178 directly and from 179 after a PostgreSQL dump and restore. The original phone and desktop sessions, pin and unused invitation remained usable. Revoked access stayed revoked. Separate upgrade checks verified the worker credential, saved OAuth login, connector grants and both peers of a paired gateway link. With the worker offline, the phone retrieved the original GIF and path-only PNG with identical bytes and MIME types.
  • Compared production Chromium builds using 2,160 items and 19 subagents, with 48 measured openings per revision across two widths and both themes. Median time to the visible last answer was 476.3 → 480.2 ms at 1280 px and 415.8 → 415.4 ms at 390 px. Both revisions requested zero older pages on open, one on scroll and eight for the selected multi-page turn, keeping the same SSE connection. The 10,000-row header update measured 4.49 → 4.53 µs. Inactive expanded content retained 7.5 MiB on both revisions.
  • Native Android kept the existing pairing after a cold start. A send reached the worker once and the app resumed from its saved checkpoint after returning from the background. Twelve pairs of unchanged controls and heartbeats produced zero React commits on both revisions.
  • Copy audit (§8) covered the enrollment instructions and image fallback. The wizard now labels the separate token and tells the user when to paste it. Inspected the web wizard with short, typical and 200-character names at desktop and phone widths in both themes and exercised the same flow in the native Android app.

For the CI fixes on 0878d0e7, 34 targeted tests passed across worker Git reads, process limits, the thread file panel and subagent permissions. A Git trace of 100 simultaneous status requests across 30 worktrees showed one filter lookup and one status process per worktree, with up to four scans in flight. A subsequent cache hit spawned zero processes. Forcing a refresh read the current filter configuration and ran status again. An idle parent can still pass its default permissions to a child or narrow them. An explicitly unknown turn ID is rejected.

Local coverage used Linux, Chromium and an Android emulator. Signed packages, native Windows/macOS and iOS remain outside these results. GitHub CI runs the full repository checks.

Fixes: #68

Related: #1049

@nixuuu
nixuuu enabled auto-merge (squash) November 20, 2026 07:12
@nixuuu
nixuuu merged commit 745aebd into dev Nov 20, 2026
17 checks passed
@nixuuu
nixuuu deleted the chore/security-audit-report branch November 20, 2026 07:35
nixuuu added a commit that referenced this pull request Nov 22, 2026
Stable v0.6.0 packaging built Linux ARM64 into `linux-arm64-unpacked`,
but the release workflow looked for the runtime under `linux-unpacked`.
The missing archive also failed the downstream ARM64 smoke job.

- Archive the Linux ARM64 runtime from the architecture-specific
Electron Builder output.
- Verify the notices produced by the prepared build. Current builds must
package both generated notices. The historical v0.6.0 build must package
its Markdown notice.
- Run Desktop smoke tests against source from `EXPECTED_SHA`. The
runtime tests import Desktop controller code, so the source and packaged
sidecars must be from the same revision. Testing the v0.6.0 artifact
with the newer controller produced a cross-origin 403 that the matching
stable source did not reproduce.

After merge, dispatch Release from `dev` against the existing stable
SHA. The Mac smoke retry retains the tests of that revision. Nightly
builds that include #1093 exercise its worker-route readiness fix.

Related: #1050

[Failed stable
release](https://github.com/itsoltech/canopy/actions/runs/45037782422)

## Verification

- Ran the archive step against Linux ARM64, Linux x64 and macOS ARM64
runtime directories and verified the contents.
- Inspected the v0.6.0 Linux build artifact and confirmed it contains
the Markdown notice and predates both generated files.
- Nine packaging verification tests passed under `check:tmp`. Focused
formatting, lint and diff checks passed.
- Verified that the recovery dry run selects the existing v0.6.0 tag and
passes the public beta SHA check.
- GitHub CI and stable recovery cover the remaining native checks and
publication.
nixuuu added a commit that referenced this pull request Nov 23, 2026
Try the next validated address when an OAuth TCP connection fails before the request can be sent. Report safe diagnostics for OAuth startup and refresh.

Fixes: #1050
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