What happened
The MCP write path broke the server's confinement-to-indexed-repository-roots invariant: reads were guarded but the write handlers were not. The fix enforces confinement in resolveFilePath for every caller and closes the dry_run read oracle by resolving the nearest existing ancestor before checking, while leaving documented out-of-scope sinks (export output_path/output_dir, scaffold, LSP WriteWorkspaceEdit) unchanged.
Why it matters
Gortex is a code-intelligence engine for AI agents. Because a single agent tool call can write into shell startup files or git hooks, an indirect prompt injection or compromised MCP client can convert the agent's file-edit capability into host code execution on the developer's machine.
Attack vector
resolveFilePath honors absolute paths verbatim, and write_file/edit_file/batch_edit/move_inline/overlay-merge/generate_skill never run the symlink-within-repo guard, so a single tool call with an absolute path can create or overwrite any file the daemon user can reach (~/.zshrc, .git/hooks/pre-commit, cron units) — arbitrary write leading to code execution. The dry_run diff also echoes out-of-root file content, an arbitrary read oracle.
Affected systems
zzet/gortex below 0.55.0 (internal/mcp/tools_fileops.go)
Mitigation
Upgrade to gortex 0.55.0 or later, which confines all paths centrally via guardSymlinkWithinRepo in resolveFilePath and refuses an out-of-root generate_skill output_dir.