Skip to content

[Feature]: Sandboxed extension runtime (Worker + IPC + capability manifest) #108

@matiaspalmac

Description

@matiaspalmac

Describe the feature

The current extension loader (apps/desktop/src/api/PluginManager.ts:73-88) evaluates index.js via new Function(...) inside the main webview, giving every extension full access to window.trixty, window.React and any Tauri IPC the webview can reach. Combined with withGlobalTauri: true and no CSP, this is effectively unrestricted RCE at the level of the IDE process.

Proposed feature:

  1. Load each extension inside an isolated Web Worker (or iframe sandbox with sandbox="allow-scripts" and no same-origin).
  2. Expose a narrow, async, typed IPC bridge between worker ↔ host based on an explicit capability manifest in package.json (e.g. capabilities: ["read-file", "workspace:search"]).
  3. Prompt the user (once per extension install) to approve capabilities.
  4. Remove direct access to window.trixty and React from inside extension code.

This is a foundational change that gates most of the extensibility roadmap and closes the highest-severity class of vulnerabilities.

Would you like to implement this feature yourself by sending a PR?

Maybe

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions