Repository navigation
fix(core): keep remote paths independent of host symlinks - #1807
Merged
Merged
Conversation
Signed-off-by: phernandez <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
phernandez
added a commit
that referenced
this pull request
Oct 23, 2026
Date the v0.24.0 entry 2026-10-22, add a Security section for GHSA-4gfv-c2mm-mvj2 (DNS rebinding, #1697) and GHSA-pqm2-2wxw-p5hx (host symlink probing, #1807), plus #1804 and #1805, and cover the changes merged since the entry was last edited (#1761 through #1807). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018CoZ3jWnMJsyQsik4tPySk Signed-off-by: phernandez <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In Cloud, a project's path is a logical object-storage prefix, not a directory on the API host. Core still treated it as one:
FileService.__init__calledbase_path.resolve(), andvalidate_project_pathresolved(project_path / path)against the host filesystem, following symlinks there. Project names and paths come from users, so a caller could steer those resolutions at host paths, and the difference between a rejected and an accepted request revealed which paths and symlinks exist on the server. Note content lives in object storage, so nothing could be read; the exposure is host filesystem probing.What
FileService(..., local_filesystem=False)keeps a logical base path unresolved and setslocal_project_pathtoNone. Object-store subclasses pass this flag; local storage is unchanged (defaultTrue).validate_project_path(path, None)applies only the lexical checks (..segments, absolute paths,~, drive letters, control characters) and never touches the filesystem.write_note,read_note,read_contentandmove_noteuse the project home only when routing selected the in-process local API (LocalASGIClient); hosted clients validate lexically.index_filerecovery endpoint, which scans disk, returns 404 when storage is not local.place_noteand resource reads usefile_service.local_project_pathinstead of resolvingproject.path.How tested
tests/api/v2/test_remote_path_validation.py,tests/mcp/test_remote_path_validation.py,tests/utils/test_remote_project_paths.py.just lintpasses.just typecheckreports the same 4pymilvusunresolved-import diagnostics asmain(optional extra not installed in a default sync).The Cloud side (
S3FileServicepassinglocal_filesystem=False) is basicmachines-co/basic-memory-cloud#2664, which will pin this commit.