Repository navigation
fix(security): keep room, Teams and external engine paths in bounds (Snyk) - #3388
Merged
Merged
Conversation
…ep delegation files in the room
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…sses - isSafePathSegment also checks the NFKC form, since normalizePath applies it - pullEngine and pushEngineSmss check the final engine paths stay in the engine folder - delegation copies and listings resolve real paths inside the room, never the room folder itself - room ids are checked before the room row is inserted - AWS S3 vector remove and list only use this engine's own index classes - Teams download returns the file name in the destination; listing returns the raw drive id; . and .. folder segments are refused
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.
Summary
Closes the Snyk Code rows in Semoss that were waiting on #3016. This branch starts fresh from current
devinstead of reviving that branch; #3016 was read as reference only.Room.roomFolderPathis now the single room-folder builder, and it rejects an unsafe room id (blank,.,..,/,\\, NUL). Six places that built the path by hand now call it: theCentralCloudStorageroom pull/push,ClaudeCodeManager,GitHubCopilotPyManagerand the two transcript locators.HumanDelegationServicechecks the run id and refuses a copy target outside the room folder.CentralCloudStorage.pullEnginerequires a safe engine id.ConnectorGuards.segment. Downloaded file names are reduced to a base name and resolved inside the target folder, the same as the OneDrive helper in fix(connectors): keep Graph links, ids and remote file names in bounds #3385.storedDocument/storedDocumentToRemove, like the other nine vector engines since fix(vector): keep embedding inputs, zip entries and stored documents inside their folders #3386.Utility.isSafePathSegment/requireSafePathSegment.Behaviour changes (each refusal is logged)
Room.roomFolderPath. Room ids are server-generated UUIDs, so real rooms are not affected./is saved under its base name.Testing
mvn compileis clean.1+1,CreateRoomthenBrowseRoomAssetsboth work. A room row with id../xis refused with "Not a valid room id" and no folder is created.