zed/nix
Cameron Mcloughlin 12a19dccef
agent: Re-enable sandbox (#61711)
Fixes the bug that made us remove the sandbox.

The bug in question was very dumb:
- there is sophisticated machinery for detecting whether a user-granted
writable path is swapped out for a symlink in the timing gap between
approval and sandbox creation
- there was no equivalent machinery to do the same for the (much larger)
gap between a user *persisting an approval* (either for the current
thread or permanently via settings)
- The fix is essentially to store canonical (i.e. absolute and
symlink-free at all depths) paths as the source of truth, but retain the
raw path for display purposes
- On WSL, there is extra care needed becasue of the bidirectional
mounting (i.e. `/mnt/c/...` and `\\wsl.localhost\Ubuntu\...`). In
particular, `/mnt/c/...` paths, since their inodes do not necessarily
pin NTFS file references, weaken the sandbox guarantees, and so we need
some extra UI to call this out and docs etc...

This also does not remove the feature flag, but just toggles it to
"enabled_for_all"

---

Release Notes:

- N/A or Added/Fixed/Improved ...

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-07-29 13:03:22 +00:00
..
dev agent: More sandboxing changes (#60111) 2026-06-30 11:10:04 +00:00
livekit-libwebrtc nix: Fix build on x86_64-linux (#52917) 2026-04-01 20:50:04 +02:00
modules agent: More sandboxing changes (#60111) 2026-06-30 11:10:04 +00:00
tests agent: Re-enable sandbox (#61711) 2026-07-29 13:03:22 +00:00
build.nix agent: More sandboxing changes (#60111) 2026-06-30 11:10:04 +00:00
toolchain.nix zed: Read ZED_COMMIT_SHA from env var when building (#51115) 2026-03-09 17:02:09 +01:00