Cursor · tool · fg-0517

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

Agent runs cat on a file listed in .cursorignore and sees its contents

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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)"] } }

Affects: Cursor editor Agent and Cursor CLI, as of 2026-10

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp