Cursor agents should be restricted from access of files outside the project without permission

I have commands set to auto run only in “sandbox” mode. Also I don’t remember allowing access to folders outside my opened projects. However, after I asked it to check the compilation errors and fix them, it started “Inspecting how other tests and the codebase handle these patterns:”. Firstly it checked the current project, but for some reason it resorted to grepping folder /User/<username>. I only noticed it because MacOS started asking for permissions to access random personal folders.

Basically cursor just started to search through personal data without permission :confused:

1 Like

I would like to configure a blocklist or allowlist of folders outside the workspace to prevent read access to ~/.ssh, ~/.aws, ~/.azure, Downloads, etc.

You can get some mileage out of hooks to block commands based on regexes, but if some skill or web search convinces the agent to just write and run a python script that accesses the files directly, the hook’s not going to see that.

1 Like