Skip to content

security: minimize desktop renderer capabilities - #209

Merged
oratis merged 38 commits into
mainfrom
codex/minimize-desktop-capabilities
Aug 2, 2026
Merged

security: minimize desktop renderer capabilities#209
oratis merged 38 commits into
mainfrom
codex/minimize-desktop-capabilities

Conversation

@oratis

@oratis oratis commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • remove the unused Tauri filesystem plugin from JavaScript, Rust, and lockfiles
  • replace broad dialog, opener, and process defaults with exact open, default-URL, and restart permissions
  • remove the renderer CSP route to the DeepSeek provider API
  • make the packaged release gate reject filesystem/shell/broad plugin capabilities and provider network access
  • correct the security model around plugin hash pinning and the current subprocess OS-sandbox limitation

Security effect

A compromised WebView can no longer use Tauri FS access, reveal arbitrary files, exit the process, call shell commands, or connect directly to the provider. Read-only file access remains behind the credential-blocking Rust command; model and workspace mutations stay in app-server.

Validation

  • pnpm release:check
  • pnpm install --frozen-lockfile --offline
  • pnpm typecheck
  • pnpm test: 1028 passed, 12 skipped
  • pnpm lint: no errors, one pre-existing warning
  • pnpm format:check
  • pnpm docs:check
  • cargo check --locked
  • cargo test --locked: 30 passed

Stacked on #208.

t added 30 commits August 1, 2026 13:32
@oratis
oratis changed the base branch from codex/app-server-release-gates to main August 2, 2026 06:36
@oratis
oratis marked this pull request as ready for review August 2, 2026 06:47
@oratis

oratis commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Review: approved ✅ — small diff, disproportionate security value

+65/−31 that removes real attack surface now that #192/#207 made the renderer a thin client.

Verified in the diff

  • fs:default capability and the entire tauri-plugin-fs dependency removed (package.json, Cargo.toml, Cargo.lock, lib.rs). Not just de-permissioned — the plugin is gone, so there is no capability to re-enable by accident. That's the strongest form of this fix.
  • dialog:defaultdialog:allow-open, opener:defaultopener:allow-default-urls, process:defaultprocess:allow-restart. Each narrowed to the one operation actually used. process:default included generic process exit; opener:default is broader than default-URL opening.
  • https://api.deepseek.com removed from connect-src in the CSP. This is the one I'd highlight: with the provider gone from the renderer (feat: move desktop runtime behind app server #192, refactor: remove legacy desktop runtime facades #207), the WebView has no legitimate reason to reach the provider API — and leaving it in connect-src would have preserved an exfiltration route for anything that did achieve script execution in the WebView. Removing it makes the thin-client boundary enforced by the browser engine itself, not just by which code we ship.
  • Gate item 6 in release-gates-v1.md locks all of this against regression.

On the security-model.md edits: both corrections make the doc less flattering and more accurate — threat #4's mitigation now reads as exact-definition review rather than the old sandbox claim, and the plugin section now says gated-capability-API rather than "no host fs/net access". Replacing an overstated guarantee with an accurate one is the right instinct; an overstated boundary is more dangerous than an acknowledged gap, because people build on it.

Validation: CI green; full suite green locally at the stack tip.

@oratis
oratis merged commit 631009d into main Aug 2, 2026
5 checks passed
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