By NHI Mgmt Group Editorial TeamDomain: Cyber SecuritySource: StracPublished August 10, 2026

TL;DR: Cursor’s Privacy Mode supports zero data retention and prevents training on code in Business and Enterprise plans, but the practical risk remains what an AI coding agent can pull into prompts from repos, terminals, fixtures, and MCP-connected systems, according to Strac. The governance issue is not retention after transmission, but blocking secrets and sensitive data before the model ever sees them.


At a glance

What this is: This is an analysis of Cursor’s privacy model and the main security gap: not training retention, but the data an AI coding agent can ingest from the developer environment.

Why it matters: It matters because IAM, NHI, and security teams need to govern what AI agents can reach, not just how providers retain prompts after submission.

By the numbers:

👉 Read Strac's guide to Cursor data privacy and security risks


Context

Cursor’s privacy mode addresses one part of the problem by limiting retention, but it does not remove the underlying access path that lets an AI coding agent read files, terminal output, and connected systems. In practice, the security question is not whether a model keeps the data, but whether the agent can reach secrets, source code, and sensitive records in the first place.

That distinction matters for IAM and NHI governance because AI coding tools behave like privileged software actors inside the development environment. When an agent can traverse repositories and connectors, the control objective shifts from data retention to data exposure prevention, secret containment, and scoped access to the systems the agent is allowed to query.


Key questions

Q: How should security teams stop AI coding tools from creating secrets sprawl?

A: Security teams should make approved secret retrieval the easiest path and block plaintext credential storage in files, chat messages, and scripts. Builders need service account-based access, secret references, and runtime retrieval patterns that keep credentials out of source control and local notes. The goal is to prevent one shortcut from becoming durable exposure.

Q: Why do AI coding agents create more data exposure risk than chatbots?

A: Because they can inspect repository context, read terminal output, and retrieve nearby files without the user manually pasting everything. That broader reach means the agent can surface secrets or sensitive records the developer did not consciously select, so the main control problem becomes limiting what the agent can reach.

Q: What breaks when AI agents are not governed at runtime?

A: Without runtime governance, an agent can shift behaviour after provisioning and still execute actions that were never reviewed in context. That is where tool chaining, MCP connections, and rapid decision-making become dangerous. Static approval cannot stop a live change in intent, so teams lose control at the point of action.

Q: Should organisations rely on zero data retention for AI coding privacy?

A: No. Zero data retention reduces post-ingestion exposure, but it does not prevent secrets, source code, or customer data from being transmitted in the first place. Organisations need prompt filtering, connector scoping, and audit logging so they can prove what was blocked before it left the environment.


Technical breakdown

What zero data retention does and does not cover

Zero data retention means the provider does not keep submitted data for model training or long-term storage beyond the stated policy boundary. That is a retention control, not a content-control mechanism. It reduces exposure after ingestion, but it does nothing to stop a prompt from containing API keys, credentials, customer data, or source code. In AI-assisted development, the real risk sits one layer earlier: the agent can assemble context from files, terminal output, and retrieved codebase material before a user sees what is being sent upstream.

Practical implication: treat retention policy as a back-end safeguard, not a substitute for prompt-time redaction and data loss prevention.

Why repository reach expands the attack surface

An AI coding agent is not limited to the file a developer manually opens. It can infer relevant context, pull adjacent files, and surface materials from configs, tests, fixtures, and environment files. That makes the developer workstation and repository into an indirect data source for the model. The attack surface expands again when connectors and MCP links allow the agent to query SaaS platforms or databases. In that model, the agent’s reach becomes the governance issue, because access scope determines what can be leaked, summarized, or embedded into a prompt.

Practical implication: define and enforce explicit data and connector boundaries for coding agents, especially where MCP or other integrations are enabled.

Secrets in prompts are the failure mode that still matters

Secrets management in AI coding workflows fails when detection happens after transmission instead of before it. If a .env file, token, or credential appears in terminal output or test data, zero retention cannot undo the exposure. This is the same fundamental problem that appears in broader NHI governance: long-lived secrets are only as safe as the controls surrounding discovery, retrieval, and propagation. The issue is not whether the provider stores the content, but whether the organisation prevented that content from becoming model input.

Practical implication: put secret detection, masking, and blocking at the submission layer, not only in downstream logging or audit workflows.


Threat narrative

Attacker objective: The objective is to get secrets, source code, or customer data into an external prompt or connector stream where they can be exposed, retained briefly, or reused outside the intended boundary.

  1. Entry occurs when a developer asks the coding agent to inspect a failure and the agent gathers repository context, terminal output, or nearby configuration files.
  2. Credential access follows when the agent pulls in .env values, API keys, tokens, or database URLs that were never meant to leave the workspace.
  3. Impact occurs when sensitive material is transmitted into the model context or connector path, creating exposure even if the provider later deletes it.

NHI Mgmt Group analysis

Privacy controls are necessary, but they are not the control boundary that matters most. Zero data retention reduces downstream exposure, yet the decisive risk is upstream context assembly. If an AI coding agent can reach secrets, customer data, or source code, the organisation has already lost the governance decision that matters most. Practitioners should treat prompt construction as a control point, not just an execution detail.

The new concept here is agent reach governance: the practice of limiting what an AI coding agent can discover, retrieve, and transmit across repos, terminals, and connectors. This matters because AI assistants behave like context-hungry software actors, and uncontrolled reach turns routine debugging into data exfiltration. Security teams should define reach boundaries the same way they define privileged access boundaries.

Cursor-like privacy models validate the value of retention minimisation, but they also expose how incomplete retention thinking is for AI governance. The relevant question is whether the organisation can prove that secrets were blocked before disclosure, not whether a provider deleted them later. That is why data controls, not marketing claims about privacy, should anchor policy decisions.

AI coding tools are becoming a de facto non-human identity problem inside developer workflows. Once an assistant can read, infer, and transmit context, it needs identity-aware boundaries, scoping, and auditing like any other privileged system actor. The governance gap is not that the tool is autonomous; it is that teams are not yet modelling it as a software entity with access consequences. Practitioners should align AI use with NHI-style control thinking.

The operational bar should be evidence, not trust. Organisations should be able to show which secrets were detected, which were redacted, and which connectors were denied before data left the endpoint. That aligns with broader identity governance expectations and makes AI-assisted development auditable instead of assumed safe. Practitioners should require proof of prevention, not just policy statements.

What this signals

Agent reach governance: the real control problem is not whether an AI assistant stores prompts, but whether it can inspect, infer, and forward sensitive data from endpoints and connectors. That shifts programme design toward least-privilege access for coding agents, prompt-time DLP, and auditable connector policy rather than privacy settings alone.

The broader identity lesson is that AI development tools are now acting like software identities with access consequences. Teams should align them with NIST Cybersecurity Framework 2.0 and the OWASP Non-Human Identity Top 10, then build evidence that secrets are blocked before disclosure rather than assumed safe after transmission.


For practitioners

  • Force prompt-time secret blocking Detect API keys, tokens, database URLs, and environment values before they leave the developer machine, and block submission when the content matches high-risk patterns.
  • Scope AI agent reach by connector Review every repo integration, MCP connector, and SaaS connector the coding agent can query, then deny access to systems that contain production data or regulated records.
  • Make Privacy Mode fleet-wide and enforced Use enterprise controls so developers cannot bypass privacy settings individually, and document the approved retention posture for all AI coding tools.
  • Log redaction events as audit evidence Capture every blocked secret, masked payload, and denied connector query so security and compliance teams can verify controls during reviews.

Key takeaways

  • Cursor-style privacy modes reduce retention risk, but they do not solve the upstream problem of what the agent can see.
  • The strongest signal in the NHI data is that secrets still live in code and config far more often than teams expect.
  • Security teams should govern AI coding tools like privileged software actors, with prompt-time blocking, connector scoping, and audit evidence.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and NIST AI RMF set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-03The article centres on secret exposure and prompt leakage, both core NHI governance risks.
NIST CSF 2.0PR.AC-4Prompt and connector scoping are access-control problems in a software-assisted workflow.
NIST SP 800-53 Rev 5AC-6Least privilege is required when AI tools can traverse repos and SaaS connectors.
NIST AI RMFGOVERNAI tool oversight needs accountability, policy, and evidence of control ownership.
OWASP Agentic AI Top 10Agent reach and tool access are central to agentic application risk.

Map coding-agent reach to PR.AC-4 and limit what files and connectors the agent can query.


Key terms

  • Zero Data Retention: A storage model in which prompts and outputs are not retained by the provider after processing, or are excluded from normal logging altogether. It reduces exposure to discovery, abuse monitoring, and later reuse, but it does not remove all other privacy or security obligations around the AI service.
  • Agent Reach: The total set of files, systems, and connectors an AI agent can inspect or query during a task. In practice, reach defines the real exposure boundary, because broader reach increases the chance that secrets, source code, or regulated data will enter model context.
  • Answer-time Redaction: A control that removes or masks sensitive content before an AI system returns a response. It matters because the risk is not only data storage or retrieval, but also what a user can infer from the final answer, especially when multiple safe sources can combine into an unsafe disclosure.
  • Model Context Protocol: Model Context Protocol is an open protocol that lets AI agents connect to tools and data sources. It expands what an agent can reach, so governance has to cover not only the model and its prompts, but also every system that can receive or return agent-driven data.

What's in the full article

Strac's full article covers the operational detail this post intentionally leaves for the source:

  • How Privacy Mode behaves across Business, Enterprise, and individual plans in day-to-day use.
  • The exact data classes Cursor can ingest from repositories, terminals, and connected systems.
  • Practical controls for redaction, masking, warning, and blocking before data reaches an AI model.
  • The article's examples of how MCP-connected tools expand the data path beyond the repo.

👉 Strac's full post covers Privacy Mode behaviour, model-provider retention, and prompt-side mitigation detail.

Deepen your knowledge

NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, secrets management, and identity lifecycle controls. It helps security and identity practitioners build the governance model needed for software actors and AI-enabled workflows.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 20, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org