Cursor · tool · fg-0517

.cursorignore does not stop Cursor Agent from reading ignored files through the terminal or MCP tools

If you see Agent runs cat on a file listed in .cursorignore and sees its contents, the cause and the fix for Cursor are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Agent runs cat on a file listed in .cursorignore and sees its contentsAn MCP tool returns data from an ignored folder
Cause
Cursor blocks ignored files from its own file reads, Tab, Inline Edit, and @ mentions, but terminal commands and MCP tools run outside those controls.
Fix
Keep real credentials out of the workspace. For the CLI add Read and Shell deny rules; in the editor rely on the sandbox read boundary and Run Mode approvals for shell access.
Apply
// <project>/.cursor/cli.json { "permissions": { "deny": ["Read(config/private/**)", "Shell(cat)"] } }
Affected
Cursor editor Agent and Cursor CLI, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun