---
title: "Zed Moves Toward Secure-by-Default: Introducing Worktree Trust"
description: "Zed now opens new worktrees in Restricted Mode, refusing to parse project `.zed/settings.json`, spawn language servers, or start MCP servers until the user explicitly trusts the worktree."
url: "https://swe.quest/articles/zed-moves-toward-secure-by-default-introducing-worktree-trust-02dbcd98e28c61e1"
canonical: "https://zed.dev/blog/secure-by-default"
source: "Zed"
published: "2025-12-17"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 7
tags: ["supply-chain-security","developer-tools","appsec","security"]
---

# Zed Moves Toward Secure-by-Default: Introducing Worktree Trust

A post on [Zed](https://swe.quest/sources/zed.md), published 2025-12-17, 7 min read, Announcement. Original: [https://zed.dev/blog/secure-by-default](https://zed.dev/blog/secure-by-default)

## Summary

Zed now opens new worktrees in Restricted Mode, refusing to parse project \`.zed/settings.json\`, spawn language servers, or start MCP servers until the user explicitly trusts the worktree. The change follows Mindgard vulnerability reports showing that a malicious project settings file could execute arbitrary shell commands via MCP \`context\_servers\` or LSP \`binary\` entries simply by opening the project. Trust is persisted per host (local, SSH, WSL), can cover a parent folder, and can be reset with \`workspace::ClearTrustedWorktrees\`. An opt-out \`trust\_all\_worktrees\` setting exists for sandboxed environments, though manually granted trust is the only kind that persists across restarts.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Supply chain security](https://swe.quest/tags/supply-chain-security.md) (Security)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [Application security](https://swe.quest/tags/appsec.md) (Security)
- [Security](https://swe.quest/tags/security.md) (Security)

## Prerequisites

- Language Server Protocol basics
- Model Context Protocol
- editor project settings ([easy posts on Developer tools](https://swe.quest/tags/developer-tools.md?difficulty=easy))

## Keywords

Zed, Worktree Trust, Restricted Mode, MCP, LSP, Mindgard

## Related posts

- [Defending Your Software Supply Chain: What Every Engineering Team Should Do Now](https://swe.quest/articles/defending-your-software-supply-chain-what-every-engineering-team-should-do-now-434c4d75b0885a00.md): Docker · 2026-04-02 · Medium · 9 min read · Supply chain security, CI/CD, Containers, AI agents
  Recent supply chain compromises (the axios npm hijack attributed to Lazarus Group, the TeamPCP campaign via Trivy's GitHub Action, Shai-Hulud, GlassWorm) share one root cause: implicit trust in mutable tags, broad long-lived tokens and unsandboxed runners.
- [Sandboxing](https://swe.quest/articles/sandboxing-a1efb1bf6e8282ad.md): Zed · 2026-08-05 · Medium · 7 min read · Sandboxing & isolation, AI agents, AI for coding, Linux, Developer tools
  Zed's agent panel now sandboxes the terminal and fetch tools by default (from 1.14) using OS-enforced restrictions: Seatbelt on macOS, Bubblewrap namespaces on Linux, and WSL on Windows.
- [Kubernetes v1.37: Hardening Container Storage with Bind Mount Options and EmptyDir Permissions](https://swe.quest/articles/kubernetes-v1-37-hardening-container-storage-with-bind-mount-options-and-b5509f20dc98b067.md): Kubernetes Blog · 2026-09-16 · Medium · 8 min read · Kubernetes, Containers, Security, Linux, Storage systems
  Kubernetes v1.37 adds two alpha storage-hardening features: per-volumeMount \`bindMountOptions\` (noexec, nosuid, nodev) applied by the container runtime, and a \`mode\` field on \`emptyDir\` volumes that replaces the hardcoded 0777.
- [The Supply Chain Paradox: When “Hardened” Images Become a Vendor Lock-in Trap](https://swe.quest/articles/the-supply-chain-paradox-when-hardened-images-become-a-vendor-lock-in-trap-081399f78d0156a6.md): Docker · 2025-08-20 · Easy · 7 min read · Supply chain security, Containers
  Pre-hardened container images reduce attack surface but can create a subtle vendor lock-in.
- [Coding Agent Horror Stories: The rm -rf ~/ Incident](https://swe.quest/articles/coding-agent-horror-stories-the-rm-rf-incident-68288dbcab0abba2.md): Docker · 2026-06-01 · Medium · 16 min read · AI agents, Sandboxing & isolation, AI for coding, Virtualization, Security
  An AI coding agent asked to clean up an old repo ran \`rm -rf tests/ patches/ plan/ ~/\`, and the trailing \`~/\` expanded to the user's home directory and wiped an entire Mac, including the Keychain, SSH keys and years of files, with TRIM-enabled SSDs ruling out recovery.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
