Your Cursor Allowlist Says git. It Also Approves git push
    Neura Market
    Neura Market
    /Cursor
    Marketplace
    Directories
    Resources
    Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeekCoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityExtensionsTrending
    CursorBlogYour Cursor Allowlist Says git. It Also Approves git push --force
    Back to Blog
    Your Cursor Allowlist Says git. It Also Approves git push --force
    ai

    Your Cursor Allowlist Says git. It Also Approves git push --force

    PromptMaster November 21, 2026
    0 views

    Cursor's agent doesn't ask before it edits files in your workspace. The Agent Security docs say it...

    Cursor's agent doesn't ask before it edits files in your workspace. The Agent Security docs say it plainly: agents can modify workspace files without approval (configuration files are the exception), changes save to disk immediately, and you should use version control so you can revert. Terminal commands are different. By default they need your approval.

    Most people want that prompt gone after a day. What replaces it is a run mode and three small files: .cursor/permissions.json, .cursor/sandbox.json and .cursorignore. The detail most often missed: a terminal allowlist entry of git doesn't mean "safe git commands". It means every command that starts with git.

    An earlier article covered which jobs to give Cursor. This one covers what its local agent may do without asking. Everything below is from the official Cursor docs, fetched on 21 Nov 2026.

    The short version

    1. Commit before you start an agent task. Edits land on disk right away.
    2. Pick a run mode on purpose. Auto-review is Cursor's recommended default; Run Everything has no checks at all.
    3. Keep allowlist entries narrow: git status, not git.
    4. Put secrets in .cursorignore, but don't treat it as a wall.
    5. Leave the sandbox network on deny-by-default and add only the domains you need.
    6. Review the diff before you merge: /agent-review or Source Control.

    1. Pick the run mode on purpose

    Run modes live in Settings > Agents > Approvals & Execution (Run Modes docs). There are three:

    • Auto-review. Allowlisted calls run immediately. Other shell commands run in the sandbox when possible. Calls that can't use the sandbox go to a classifier that decides whether they run or come back to you. Cursor made this the recommended default in version 3.6 (29 May 2026).
    • Allowlist. Only what's on your allowlist runs without approval. With sandboxing on, supported shell commands can run in the sandbox. An empty allowlist gives you the old "ask every time" behaviour, which was deprecated in 3.5.
    • Run Everything. Every tool call runs automatically. No sandbox, no classifier.

    Keep two lines from the docs in mind: run modes are "best-effort guardrails rather than a hard security boundary", and the classifier "can make mistakes" in both directions. Run modes also apply to local agents only. Cloud Agents run on their own dedicated machine and never ask you to approve an action.

    2. Your allowlist is prefix matching

    The terminal allowlist can live in the settings UI or in permissions.json, either ~/.cursor/permissions.json (all projects) or <repo>/.cursor/permissions.json (one project). The permissions.json reference defines the matching: entries are command prefixes, case-sensitive. git matches git status, but it also matches git push --force and git reset --hard. npm matches npm publish.

    In Auto-review that matters more than it looks: per the docs, allowlisted calls run immediately and outside the sandbox, so they skip the sandbox and the classifier. Separate protections can still force a prompt, such as File-Deletion Protection (it covers rm) and External-File Protection (files outside the workspace), but neither one covers git push.

    A narrower list looks like this:

    {
      "terminalAllowlist": ["git status", "git diff", "git log", "npm test", "ls"],
      "mcpAllowlist": ["github:get_issue", "linear:list_issues"],
      "autoRun": {
        "allow_instructions": [],
        "block_instructions": [
          "Any git push, git reset or git rebase should go through approval first.",
          "Any command that publishes a package should go through approval first."
        ]
      }
    }
    

    Three details from the reference:

    • MCP entries are server:tool. github:* approves every tool on that server and *:* approves every tool on every server. Name the tools you've actually read.
    • autoRun instructions are plain English for the Auto-review classifier. The docs call them steering, not enforcement, and they do nothing in Allowlist or Run Everything mode.
    • The file wins over the UI, and both files add up. A file-defined allowlist makes the in-app editor read-only, and arrays from your user file and the repo file are concatenated.

    That last point has a consequence the docs don't spell out: a repo you clone can bring its own .cursor/permissions.json, and its entries join yours. Read that file before you run the agent in someone else's repo, the same way you'd read a stray AGENTS.md.

    3. .cursorignore hides files from the agent, not from the shell

    Per the ignore file docs, files in .cursorignore are blocked from the Agent, Tab and @ mentions. The same page says the agent's terminal and MCP tools can't block access to them, and that protection "isn't guaranteed due to LLM unpredictability".

    Covered by default: your .gitignore plus a built-in list that includes .env*. Not covered: .pem, .key and credentials.json, and the global ignore list in user settings starts empty. The docs suggest **/.env, **/.env.*, **/credentials.json, **/secrets.json, **/*.key, **/*.pem and **/id_rsa. The syntax is the same as .gitignore, and the docs suggest testing patterns with git check-ignore -v.

    For a boundary outside the project, Cursor 3.23 added Read Access. Set it to Workspace and the agent has to ask before reading files outside the workspace, unless they're on your Read Allowlist. The default is System, which reads without asking.

    4. The sandbox: leave the network on deny

    The sandbox runs supported terminal commands with read and write access inside the workspace and network access blocked by default, then opened by your network mode and sandbox.json (sandbox.json reference). The default network mode adds Cursor's built-in list of package-manager and tool domains to yours.

    • "networkPolicy": {"default": "deny", "allow": [...]} limits sandboxed commands to the listed domains. Deny rules always beat allow rules.
    • Private addresses such as 10.x, 192.168.x, 127.x and the cloud metadata endpoint are blocked by default.
    • .cursor/*.json and .cursorignore are write-protected inside the sandbox, so a sandboxed command can't loosen them.
    • On Linux the sandbox needs kernel 6.2+ with Landlock. Without it, Cursor falls back to asking before running commands.

    A small check you can run on a repo

    To check these in one go, I wrote cursor_guard_check.py (about 100 lines, Python standard library plus git). It reads a repo's .cursor/permissions.json, .cursor/sandbox.json and ignore files, then flags bare command prefixes, server:* MCP entries, an open network policy, and files that look like secrets but aren't ignored. It reads files only: it can't see your Cursor Settings, team policies or ~/.cursor, and the list of risky prefixes is my choice, not Cursor's.

    I ran it on 21 Nov 2026 against a demo repo I made up for this, with a loose config "copied from a blog post" ("git", "npm", "github:*", network allow) and fake key files. Real output:

    WARN  terminalAllowlist "git" is a bare prefix; it also matches: git push --force, git reset --hard
    WARN  terminalAllowlist "npm" is a bare prefix; it also matches: npm publish, npm install <anything>
    WARN  mcpAllowlist "github:*" auto-approves every tool from github
    INFO  no autoRun.block_instructions (only matters in Auto-review mode)
    INFO  this repo ships its own permissions.json; its entries are added to yours
    WARN  sandbox.json networkPolicy.default is "allow" (any host)
    INFO  readBoundary is "system": the agent can read outside the workspace without asking
    WARN  config/credentials.json looks like a secret and is not in .cursorignore
    WARN  config/deploy.pem looks like a secret and is not in .cursorignore
    INFO  .cursorignore does not stop terminal commands or MCP tools from reading files
    Result: 6 warning(s), 4 note(s)
    

    After switching to the permissions.json above, a deny-by-default sandbox.json with readBoundary: "workspace", and a three-line .cursorignore, the same run printed Result: 0 warning(s), 2 note(s). The two remaining notes are the ones no config file fixes.

    5. After the session: review the diff, not the summary

    The summary says what the agent meant to do; the diff shows what it did. Agent Review runs a code review on your local changes: type /agent-review in the agent input, or run it from the Source Control tab to compare all local changes against your main branch. It has a Quick depth (fast, low cost) and a Deep one (slow, higher cost) for security-sensitive code or big refactors. You can also set it to run automatically; from Cursor 3.11 that setting is under Git & PRs > Pull Requests.

    Checklist

    • Commit, or start a branch, before every agent task.
    • Choose Auto-review or Allowlist in Approvals & Execution; skip Run Everything on code you care about.
    • Replace bare prefixes (git, npm, curl, bash) with exact commands.
    • Name MCP tools; avoid server:* and *:*.
    • Read .cursor/permissions.json in any repo you didn't write.
    • Add key and credential patterns to .cursorignore or the global ignore list.
    • Set Read Access to Workspace unless the agent needs files outside the project.
    • Keep the sandbox network on deny and list the domains you need.
    • Run /agent-review before you merge.

    Where to go next

    If you're new to Cursor, the free Cursor AI Quick-Start Cheat Sheet puts the AI surfaces, the essential keyboard shortcuts, the @ symbols for context and a 60-second starter workflow on 5 pages you can keep beside your editor.

    When you want to go further, Cursor AI Mastery: The Complete Guide is a 41-page guide covering Agent Mode, Background (now Cloud) Agent workflows, model selection, MCP and Skills, rules, 12 common pitfalls with fixes, 20 power-user tips and a 30-day mastery plan.

    This article was written with the assistance of AI and reviewed by the author. Cursor behaviour is from the official Cursor docs (Agent Security, Run Modes, permissions.json, sandbox.json, ignore file and Agent Review pages), fetched on 21 Nov 2026. The script output is a real run on 21 Nov 2026 against an invented demo repo; Cursor itself was not run for this article. PromptMaster guides are independent and not affiliated with or endorsed by Cursor.

    Tags

    aicursorsecurityproductivity

    Comments

    More Blog

    View all
    Cursor's SSH reconnect replayed a backlog of undo-diffs onto a live workspaceai

    Cursor's SSH reconnect replayed a backlog of undo-diffs onto a live workspace

    A Cursor user working over Remote-SSH into a Linux GCP VM had their SSH connection drop and...

    R
    Ramdai Bista
    How to give Cursor memory between sessionscursor

    How to give Cursor memory between sessions

    Cursor forgets your architecture, your decisions and yesterday's task every time you open a new chat. Rules files help, but they only hold what you write by hand. Here is how to give Cursor a real memory that it reads and writes itself, shared with every other AI you use.

    N
    nestdaddy
    1
    Free web search MCP servers for Claude Code and Cursor, no API key (2026)mcp

    Free web search MCP servers for Claude Code and Cursor, no API key (2026)

    Disclosure: we build Clawifi, one of the options below, at ReARC Labs. Every limit in this post...

    A
    Atakan Elik
    cursor skills: what they are, where they live, and how to set one upcursor

    cursor skills: what they are, where they live, and how to set one up

    You installed a skill, opened Agent chat in Cursor, and it is nowhere to be found. Or worse, it shows...

    L
    Lookbk
    1
    Cursor's Cloud Agent auto-recycled an idle VM and erased 61 tasks of workai

    Cursor's Cloud Agent auto-recycled an idle VM and erased 61 tasks of work

    A developer had built up a project over 61 completed Cursor Cloud Agent tasks, the most recent of...

    R
    Ramdai Bista
    Mermaid Alternatives for AI Coding Agents: Why Typed JSON IR + Browser Checks Beat Syntax Promptingmermaid

    Mermaid Alternatives for AI Coding Agents: Why Typed JSON IR + Browser Checks Beat Syntax Prompting

    Maintainer disclosure: I maintain Archify (tt-a1i/archify, Apache-2.0). This comparison covers real...

    T
    tt-a1i

    Neura weekly digest

    Stay up to date

    The week's most-read AI news, trending AI tools and new automation workflows, in one email. At most once a week. Free, and you can unsubscribe in one click.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Games
    • Blog
    • Videos
    • Guides
    • Courses
    • Community
    • Extensions

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Cursor resource

    • Automate Employee Onboarding with Slack, Jira, and Google Workspace Integrationn8n · $24.99 · Related topic
    • Intelligent AI Digest for Security, Privacy, and Compliance Feedsn8n · $24.99 · Related topic
    • AI Privacy-Minded Router: PII Detection for Privacy, Security, & Compliancen8n · $14.99 · Related topic
    • AI Resume Screening & Evaluation for HR with GPT-4 & Google Workspacen8n · $14.99 · Related topic
    Browse all workflows