-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Mark code-workspace files as protected #7403
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
Conversation
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.
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", |
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.
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) |
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.
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.
Credit to @thelicato for reporting this
Important
Add
*.code-workspaceto protected patterns inRooProtectedControllerand update tests accordingly.*.code-workspaceto protected patterns inRooProtectedControllerto prevent code execution.RooProtectedController.spec.tsto verify*.code-workspacefiles are write-protected.This description was created by
for 32b5636. You can customize this summary. It will automatically update as commits are pushed.