-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat(modes): add regex scoped read permissions per mode + orchestrator skills read allowlist #10411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Re-review complete. No outstanding issues found.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
|
Fixed: read_file fileRegex enforcement now also validates when toolParams.files is a JSON string. Added tests for both allowed/blocked JSON-string payloads.\n\nChanges:\n- src/core/tools/validateToolUse.ts\n- src/core/tools/tests/validateToolUse.spec.ts |
4e46243 to
2490135
Compare
| } | ||
| } | ||
|
|
||
| function tryParseJson(value: string): unknown | undefined { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like a lot - is this what we do for the edit file regex too? Could we just share that code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roomote follow this suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixaroo
See task on Roo Cloud
Refactored XML path extraction into shared extractPathsFromXmlArgs() function used by both edit and read file regex validation. All local checks passed.
Summary
fileRegexon thereadgroup for theread_filetool (native{ files: [...] }payloads).FileRestrictionErrorto supportreadvseditwording.SKILL.mdfiles, supporting both:.roo/skills(-<mode>)/<skill>/SKILL.md/Users/<user>/.roo/skills(-<mode>)/<skill>/SKILL.md/C:\\Users\\<user>\\.roo\\skills(-<mode>)\\<skill>\\SKILL.mdKey changes
src/core/assistant-message/presentAssistantMessage.tssrc/core/tools/validateToolUse.ts<location>uses absolute paths:src/core/prompts/sections/skills.tspackages/types/src/mode.tsTests
cd src && npx vitest run shared/__tests__/modes.spec.tsNotes
fileRegexon thereadgroup.