Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Aug 26, 2025

Credit to @thelicato for reporting this

Important

Add *.code-workspace to protected patterns in RooProtectedController and update tests accordingly.

  • Behavior:
    • Add *.code-workspace to protected patterns in RooProtectedController to prevent code execution.
  • Tests:
    • Add test cases in RooProtectedController.spec.ts to verify *.code-workspace files are write-protected.

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

@mrubens mrubens requested review from cte and jr as code owners August 26, 2025 04:01
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Aug 26, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Aug 26, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 26, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! The implementation successfully adds code-workspace files to the protected patterns, which is an important security enhancement. I've reviewed the changes and have a couple of minor suggestions for improvement.

".rooprotected", // For future use
"AGENTS.md",
"AGENT.md", // Alternative singular form for compatibility
"AGENT.md",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment "Alternative singular form for compatibility" was removed from the AGENT.md line. Was this intentional? If not, you might want to restore it:

it("should protect .code-workspace files", () => {
expect(controller.isWriteProtected("myproject.code-workspace")).toBe(true)
expect(controller.isWriteProtected("pentest.code-workspace")).toBe(true)
expect(controller.isWriteProtected(".code-workspace")).toBe(true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good comprehensive test coverage! I notice you're testing (without a prefix). Is this a valid workspace filename that VSCode actually uses? If not, we might want to remove this test case to keep tests focused on real-world scenarios.

@mrubens mrubens merged commit 296edfc into main Aug 26, 2025
15 checks passed
@mrubens mrubens deleted the mark_code_workspace_files_as_protected branch August 26, 2025 04:09
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 26, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants