{"version":"2.1.217","anchor":"path-containment-security-overhaul","canonical_anchor":"path-containment-security-overhaul","heading":"Path Containment Security Overhaul","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.217\/e\/path-containment-security-overhaul","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.217","markdown":"### Path Containment Security Overhaul\n\nThe system that prevents worktree-isolated agents from writing outside their assigned worktree has been substantially rewritten to handle complex path forms that could previously bypass containment.\n\nNew protections:\n\n- UNC shares (Windows `\\\\server\\share` paths) are detected and blocked when the session root is local\n- `\/net\/` automount paths (Linux\/macOS NFS automounts) are recognized and normalized\n- Apple `\/System\/Volumes\/Data\/` paths are remapped to their real root\n- Paths with raw dot-segments that survive `path.normalize` are blocked\n- Windows paths with trailing dots or spaces (a Windows security concern) are detected\n- Device namespace paths (`\\\\?\\`) are unwrapped or blocked as appropriate\n- Symlink resolution now iterates up to 8 rounds to reach a stable canonical form\n\nError messages are more specific. For example, a network-shaped path against a local checkout says: > This write was blocked because the path is network-shaped (a UNC share or \/net automount spelling) while this session's checkout is local.\n\nA path that can't be safely resolved says: > This write was blocked because the path is spelled in a form that cannot be safely resolved (for example through a symlink storing a raw dot segment, a network-share or device-namespace shape, or an unreadable ancestor directory).\n\nCommands run by worktree-isolated agents now get a more specific rejection if their working directory resolves outside the worktree due to letter-case mismatch: \"(this path differs from the registered spelling only by letter case \u2014 respell it to match exactly)\".\n\n**Evidence**\n\nPath resolution (search for `\"resolves-to-trailing-dot-or-space\"`) and network-shaped block (search for `\"network-shaped (a UNC share\"`)"}