Security and workspace trust
Workspace trust
Opening a folder must never run its code. Many developer tools do: rust-analyzer runs build.rs scripts and procedural macros, other servers run project plugins.
| Restricted (default) | Trusted | |
|---|---|---|
| Browse, open, edit, save | Yes | Yes |
| Syntax highlighting, bundled/user extensions | Yes | Yes |
| Language servers | No | Yes, per profile |
| Workspace tasks, workspace extensions | Not implemented | Not implemented |
- Trust is granted per folder by the user (banner or Workspace menu) and stored in
<config>/trust.toml, never in the folder. Subfolders of a trusted folder are trusted. - Revoking trust stops the folder's language services immediately and clears their diagnostics.
- Files outside the open folder never start language servers.
- An unreadable or corrupt trust file means every folder is restricted.
Threat model
| Threat | Mitigation in the MVP | Residual risk |
|---|---|---|
| Malicious repository runs code on open | Restricted by default; servers only after explicit trust; no task runner. | A trusted repository can run arbitrary code through its tooling, as in any IDE. |
| Repository changes IDE settings or extensions | Settings, profiles, trust and extensions come only from the user config directory. | Anyone who can write the user config directory controls the IDE. |
| Malicious extension | Format 1 is declarative; regexes are linear time and size-limited; themes cannot restyle chrome. | Misleading command titles; no signing or marketplace review yet. |
| Untrusted language-server output | Positions clamped, stale versions dropped, unknown server requests rejected, bounded stderr capture. | Servers run with full user privileges; they are not sandboxed. |
| Data loss | Conflict-checked atomic saves; confirmations for closing or quitting with unsaved work. | Same-size changes within timestamp resolution can be missed. |
| Leaking code or secrets to AI providers | User-initiated requests, exact preview, secret-pattern warnings, file name only. | Warnings are heuristics; the user decides. |
| Credential exposure | Keys only via environment variables; redacted from debug output; no logging of request bodies. | Environment variables are visible to other processes of the same user. |
| Path tricks | Canonical paths; symlinked targets saved in place; symlink cycles not followed. | |
| Dependencies | cargo deny checks advisories, licences and sources in CI. | Advisory databases lag new issues. |
Process isolation is not sandboxing
Language servers run as separate processes for fault isolation. They have the same privileges as the IDE. The same will be true of the planned out-of-process extensions until OS sandboxing is added.
Report vulnerabilities as described in SECURITY.md.