Prevent path traversal in tool config names#2910
Merged
Conversation
Reject tool and config names containing /, \, or .. in ToolConfigModel to prevent writing arbitrary files within the shared /plugins directory. Added client-side validation in SaveConfigDialog.vue and backend validation in both Ruby and Python models with corresponding specs. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2910 +/- ##
==========================================
- Coverage 78.28% 78.21% -0.08%
==========================================
Files 673 673
Lines 55204 55229 +25
Branches 728 728
==========================================
- Hits 43216 43196 -20
- Misses 11910 11955 +45
Partials 78 78
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ryanmelt
requested changes
Mar 4, 2026
Member
ryanmelt
left a comment
There was a problem hiding this comment.
Generally regex is not a secure method to check for path traversal. Better would be to whitelist allowed characters if that makes sense for the given use case.
Replace denylist regex that blocked specific dangerous characters with an allowlist pattern that only permits letters, digits, hyphens, underscores, spaces, and periods. This is more secure as it rejects unexpected characters by default rather than trying to enumerate all dangerous ones. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
ryan-pratt
previously approved these changes
Mar 4, 2026
ryanmelt
approved these changes
Mar 5, 2026
jmthomas
added a commit
that referenced
this pull request
Mar 21, 2026
Prevent path traversal in tool config names
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.



Reject tool and config names containing /, , or .. in ToolConfigModel to prevent writing arbitrary files within the shared /plugins directory. Added client-side validation in SaveConfigDialog.vue and backend validation in both Ruby and Python models with corresponding specs.