Skip to content

Conversation

@roomote
Copy link
Collaborator

@roomote roomote commented Jun 16, 2025

  • Fixed bug in isToolAllowedForMode where file regex validation was only
    triggered when content/diff/operations were present
  • Mode permissions are now enforced as soon as a file path is provided,
    preventing bypass during streaming/partial tool calls
  • Updated tests to reflect correct behavior and added reproduction test
  • This prevents modes like Architect from editing restricted files like
    PowerShell scripts when they should only edit markdown/config files

Important

Fixes bug in isToolAllowedForMode to enforce file restrictions immediately when a file path is provided, preventing unauthorized file edits in specific modes.

  • Behavior:
    • Fixes bug in isToolAllowedForMode in modes.ts to enforce file restrictions immediately when a file path is provided.
    • Prevents modes like Architect from editing restricted files (e.g., PowerShell scripts) when they should only edit markdown/config files.
  • Tests:

This description was created by Ellipsis for 33e0004. You can customize this summary. It will automatically update as commits are pushed.

…provided

- Fixed bug in isToolAllowedForMode where file regex validation was only
  triggered when content/diff/operations were present
- Mode permissions are now enforced as soon as a file path is provided,
  preventing bypass during streaming/partial tool calls
- Updated tests to reflect correct behavior and added reproduction test
- This prevents modes like Architect from editing restricted files like
  PowerShell scripts when they should only edit markdown/config files
@roomote roomote requested review from cte, jr and mrubens as code owners June 16, 2025 21:41
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Jun 16, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 16, 2025
@daniel-lxs
Copy link
Member

Closing temporarily, see #4732 (comment)

@daniel-lxs daniel-lxs closed this Jun 16, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 16, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jun 16, 2025
@roomote roomote deleted the fix-4732 branch June 19, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants