Skip to content
redactsure
Book a demo

Explore.

Data Report · RedactSure Research
Chris Sowa · Founder, RedactSure
Published
Last updated

What Credentials Can Cursor Reach on My Computer?

Anything in the working tree that .cursorignore does not list, anything a terminal command can read after you approve it, and anything an MCP server it connects to holds. Before a task runs on a machine with live credentials, write down those three sets and move anything you cannot bound into a store outside its reach.

A credential reference travels from a browser record through a bounded route to a separate API destination.

A Cursor task fails on an expired cloud profile, the agent proposes a one-line command to inspect the credentials file, and the developer approves it because the command is short and the work is routine. The output returns to the run, and the access key that signs every deployment from that laptop is now in a model's context. Nothing unusual happened: the command was approved, the file was never in the project, and no page was rendered.

The question that remains is an inventory. A developer machine keeps credentials in the home directory, in the variables a shell exports, and in the configuration an MCP server reads, and Cursor places a different gate in front of each surface. Each gate is real, and each governs an action rather than a value. A long-lived access key is a bearer credential: whatever command can read it can act as the developer until someone rotates it, which is why the distance between a gate and a boundary matters more than the length of the ignore list.

The dotenv file is the common case, worked through in Does Cursor Read My .env File?. What the machine holds beyond that, and which of Cursor's surfaces reaches it, is a question a developer can settle before the next task runs.

Key findings

  • For a credential on a machine to stay out of the model's reach, the boundary has to sit around the value rather than around the action: least privilege governs the actions and credentials an agent may use, and it does not govern what the agent reads (What Is Least Exposure?).
  • It would also require a named person approving each command against a list of what it will inherit, and a record of what the run could read, because a value the environment holds is readable by every command the approval permits (Does Codex's Full Sandbox Escalation Expose Your Credentials?).
  • Cursor's block stops at the tools that ask it for a path, and the page says the terminal and MCP tools "cannot block access to code governed by .cursorignore" (Cursor, Ignore, 2026).
  • Cursor's security page warns that "AI can behave unexpectedly due to prompt injection, hallucinations, and other issues," and its answer is two approvals, one for terminal commands and one for MCP connections (Cursor, Security, 2026).
  • GitGuardian's 2025 count, as reported, found "24,008 unique secrets exposed in MCP configuration files," one measure of how often the configuration a server reads carries a live value (Help Net Security, 2026).
  • Docker's sandbox documentation states that "Credential values are never stored inside the VM," which keeps the value out of the process an agent's commands run in (Docker, Isolation, 2026).

What credentials does Cursor's agent read in the file tree?

The scope comes first, because a browser control and a coding agent work on different surfaces. A governed browser environment begins at the rendered page: a dashboard, a console, a settings page or a sign-up form is what the agent reads and acts on. It does not cover the terminal, the IDE, the local filesystem, direct API calls or MCP. The credentials in a home directory sit on the far side of that line, so the question for this page is what bounds them instead.

Cursor's own tools read what they ask for. The ignore-files page says Cursor blocks "Code accessible by Agent, Tab, and Inline Edit" and "Code accessible via @ mention references" for the paths .cursorignore lists (Cursor, Ignore, 2026). A file outside that list is read the way any other file is, by whichever tool opens it.

The record type is one home directory on a developer laptop, and the inventory is ordinary: a shared cloud credentials file with a long-lived access key, a directory of SSH keys, a dotenv file for local services, and the configuration an MCP server was given. The cloud key matters most because it works from any machine and stays valid until someone rotates it. The path-rule question for that file is set out in (Can a Coding Agent Read My AWS Credentials File?), which reaches the same conclusion from the file side: a block covers the tools that ask, not every route to the value.

The file tree is the surface with the most documented control and the least certainty, and it is only one of three routes to a value on the machine.

Does .cursorignore stop the agent from reading a credential file?

The ignore file is the control Cursor documents most fully, and two exceptions decide what it is worth for a credential. The first is the default list: files in .gitignore and in a default list that includes .env* are "automatically ignored," and the page does not say which features that exclusion applies to, so an ignored file is not the same as a file the agent cannot read (Cursor, Ignore, 2026). The dotenv case is worked through in (Does Cursor Read My .env File?).

The second is the surface. Cursor says that "The terminal and MCP server tools used by Agent cannot block access to code governed by .cursorignore," so a listed path stays readable by a command or by a server the agent connects to (Cursor, Ignore, 2026). The file list is a rule for the tools that ask Cursor for a path, and the terminal does not ask.

What the block does cover, it covers for the agent's own reads: a credential path listed in .cursorignore stays out of Agent, Tab, Inline Edit and @ mentions, which is the route a file list can govern. The limit is the vendor's own statement, and it is narrower than the habit most teams build around the file.

A team should keep the entry for every path that holds a value and stop treating the entry as the answer to the question in the title. The list is one layer, and the same page places two of the three routes outside it.

What do the vendors themselves say?

Cursor's documentation is the record for the two gates, and it is specific about what each covers and quiet about the value behind it. On the agent security page, "By default, terminal commands need your approval" and "All MCP connections need your approval," and the run modes are described as "best-effort guardrails rather than a hard security boundary" (Cursor, Security, 2026). The page does not mention a sandbox, and it does not say how credentials are stored or protected.

Dimension Cursor, per its documentation What a buyer should verify
File reads .cursorignore blocks "Code accessible by Agent, Tab, and Inline Edit" and "Code accessible via @ mention references" that every credential path is listed, and that no later entry reopens one
Defaults .gitignore entries and a default list that includes .env* are "automatically ignored" which features the exclusion covers, since the page does not say
Terminal "By default, terminal commands need your approval" what the approved command can read after it starts
MCP "All MCP connections need your approval" what the connected server holds and returns
Run modes "best-effort guardrails rather than a hard security boundary" where the boundary sits outside the model
Credential handling no sandbox is mentioned; storage and protection are not described where the values live and who can read them

Read together, the table shows the surfaces a buyer has to check: each row is something Cursor documents, and no row names a place where the value is held.

Vendor pages outside Cursor show what a credential boundary looks like. AWS's Secrets Manager page describes a runtime call that returns a credential and "an automatic rotation schedule" for it (AWS, 2026). 1Password and Browserbase describe a browser design in which "Credentials are not shared with the LLM or exposed in Browserbase logs and repos," with approval prompts on the person's own device (1Password and Browserbase, 2025). Each design covers the surface it was built for, and neither is a Cursor feature.

What can an approved terminal command read?

An approval is a decision about a command, not about the files the command will touch. Cursor's default stops the command until a person allows it, and the page documents a gate on the command and not a list of the paths it may touch (Cursor, Security, 2026). Once allowed, the command runs as the developer's user account, so its reach is the account's reach: the home directory, the credentials file the cloud CLI reads, the SSH directory, the exported variables, and anything a script in the repository opens.

The packaging script shows the difference. It reads the shared credentials file to sign an upload, and the approval named the script. The model may never see the access key and the command may still use it, print it, or send it to a host the network allows. An approval can be given correctly and still leave the account exposed.

The environment is the part to inspect. A value exported as an access key id or a session token is inherited by every command the approval permits, so the variable list in the shell is as much a credential inventory as the files in the tree (Does Codex's Full Sandbox Escalation Expose Your Credentials?). What Is a Tethered Agent? describes the same property from the authority side: the tether says where the agent may go, not how far a permitted step can reach.

Custody does not close it either. A vault can issue a credential for one run, and the agent is still the process that fetches it, so the value arrives in the run that reads it (Does HashiCorp Vault Keep Credentials Away From a Coding Agent?).

Docker's credential page states that "The real credential stays on the host when proxy management is active; the sandbox sees only a sentinel value," which keeps the value out of the process a command runs in (Docker, Credentials, 2026). OWASP's credential-hygiene guidance says to "Prefer using temporary credentials over static credentials" and to "Avoid sharing the same set of credentials across multiple contexts" (OWASP, 2026). Neither is a feature of Cursor; both are choices a team makes before the run.

What does an MCP server read that the agent does not?

An MCP connection is approved once, and the server behind it is a program that runs with the privileges of whoever started it. Cursor's page states that "All MCP connections need your approval," a gate on the connection rather than on the reads that follow (Cursor, Security, 2026). The protocol's security guidance is explicit about the privilege: it tells implementers to "Warn that MCP servers run with the same privileges as the client," and it says servers "MUST NOT accept any tokens that were not explicitly issued for the MCP server" (Model Context Protocol, 2026).

A server usually holds credentials of its own. Its configuration file names the token or connection string it needs, and that file sits in the project or in the developer's configuration directory, in the same inventory as the credentials file. A server connected to a repository or a cloud account can read what its token allows, and the approval recorded at connection time does not say which of those reads happened.

The guidance adds a rule worth writing into a review: "Poor scope design increases token compromise impact, elevates user friction, and obscures audit trails" (Model Context Protocol, 2026). A token issued for one server and one job is the design the guidance asks for, and it is a decision the team makes when it writes the configuration rather than one the approval makes later.

What does a governed environment change?

A governed environment is a control class that acts where a page is rendered, before any model reads it. Values chosen by policy are replaced with consistent tokens for the whole run, so the model works on placeholders such as AWS_KEY_001. Real values resolve only at an approved destination, at the moment of an approved action. A named person confirms the policy and approves each consequential action, and every screen as tokens, every action and every approval is written to a record that exports to the organization's own monitoring.

For this page's question the class changes one half of the reach. When the agent opens a console's security credentials page, a repository's deploy key settings or a CI variable page, the model reads tokens in place of the values and the work continues on the tokens. A command that reads the shared credentials file or an environment variable is outside it, and no page-level control changes what a process inherits.

The control is model agnostic and works with any model, because the substitution happens before any model reads it, and it is enforced outside the model where integrated. Its scope is the rendered page in supported workflows: it does not cover the terminal, the IDE, the local filesystem, direct API calls or MCP, so the file and shell reach stay with the sandbox, the credential store and the person who approves the command (RedactSure vs Cursor: 2026 Comparison & Alternative).

What the record shows

Cursor's pages describe gates on actions rather than a boundary around the value (Cursor, Security, 2026), and the record of what a run could read is the part they leave open. The file list covers the tools that ask Cursor for a path, the approvals cover a command and a connection, and the pages reviewed do not describe a sandbox or a statement of where credentials are stored (Cursor, Ignore, 2026; Cursor, Security, 2026). A command approved correctly can still read the account's long-lived key, and the work continues with whatever the command returned. Test it on one machine rather than on the documentation: write down the credential files in the tree, the variables the agent's shell starts with and the servers in the MCP configuration, then add each file path to .cursorignore, repeat the run and compare what the agent could read. The entry closes the agent's own file reads, while the command, the server and the environment stay open and need a sandbox or a different custody design.

Methodology and limitations

This page rests on Cursor's agent security and ignore-files documentation, Docker's sandbox isolation and credential pages, AWS's Secrets Manager introduction, a 1Password and Browserbase announcement, OWASP's credential-hygiene entry, the Model Context Protocol's security guidance, one press report on GitGuardian's 2025 count, and existing RedactSure research pages. Public documentation read in full gives a sound view of where each product applies its control. Vendor pages were read between October 20, 2026 and October 21, 2026, and each Sources line carries the date for its page.

No product on this page was tested, and "not described" means the pages listed in Sources. Vendor features change and the page carries its date. The example describes a record type, a home directory with a shared cloud credentials file, and not an organization. RedactSure is deploying now with enterprise and government customers. Determinations about whether a configuration meets a legal or contractual requirement belong to counsel, assessors and the organization's own security and compliance officers, and nothing here replaces a pilot of one workflow on the organization's own machines.

Frequently asked questions

What credentials can Cursor reach on my computer?

Anything the agent's own tools open in the working tree outside .cursorignore, anything an approved command can read with the developer's account, and anything an MCP server it connects to holds. Cursor documents a file block for the first route and approvals for the other two. The block has exceptions for the default list, and Cursor says the terminal and MCP tools cannot honor it. The inventory, not the ignore list, is the answer.

Does .cursorignore stop the agent from reading ~/.aws?

Only where the path is listed, and only for the agent's own file reads. A line such as .aws/** keeps the directory out of Agent, Tab, Inline Edit and @ mentions. It does not reach a terminal command or an MCP server, which Cursor says cannot block access to code the rule governs. Check that the path is listed, then check the routes the rule does not cover.

Is an approved terminal command limited to the project folder?

No. The command runs as the developer's user account, so it can read the home directory, the cloud credentials file, the SSH directory and the environment the shell exported. The approval gates the command, and the page documents no list of the paths the command may touch. A sandbox that does not hold the credential is the control that changes the answer.

What record does Cursor keep of what the agent read?

Not from the pages reviewed. Cursor documents approvals for terminal commands and MCP connections and describes its run modes as best-effort guardrails, and it does not describe a per-command or per-read record. The audit question is taken up in (Does Cursor Keep an Audit Log of What the Agent Did?). A team that needs the evidence keeps its own list of the files, variables and servers in the run.

Do MCP servers read files that .cursorignore blocks?

Yes. Cursor says the terminal and MCP server tools used by Agent cannot block access to code governed by .cursorignore, so a listed path is still readable by a connected server. The server runs with the privileges of whoever started it, and its configuration file usually holds the credential it uses. Approving the connection does not describe the reads that follow, so scope the token to one server and one job and read the configuration file it was given.

What would bound what Cursor can reach?

A boundary around the value, not around the action. On a rendered page, that means tokens in place of the values before any model reads the page. In the file tree and the shell, it means a sandbox that does not hold the credential and a credential issued for one run. A named person approving each consequential action, and a record of what the run could read, complete the set.

About the author

Chris Sowa is a founder of RedactSure and a former CEO of an AI company; he started it years before ChatGPT existed. He previously led AI at Accenture, served as Global VP of Strategy & Innovation at Schneider Electric, was CCO of Sovos, and spent more than a decade at Oracle, with earlier roles at SAP and IBM.

How RedactSure Keeps a Rendered Key Out of the Model

An approved command inherits the developer's reach, and an ignore file stops the agent's own reads while leaving the terminal and MCP alone. Cursor states that its terminal and MCP tools cannot block access to code governed by .cursorignore (Cursor, Ignore, 2026).

The environment that enforces this is built by RedactSure, an AI agent controls, governance and data protection company.

Before: the agent opens the console's security credentials page, the page renders the key id and the value, and the model keeps both for the run. Inside: both fields render as AWS_KEY_001, the agent works from the token, the real values reach the signing step only on a named person's approval, and the screen, the action and the approval land in the AI Control Record.

RedactSure is deploying now with enterprise and government customers.

Everyone else controls where data can go. RedactSure controls what the AI can see.

See it on your own workflow

A key a console renders is the half a page-level control can close. Bring one page that shows a credential and see, with test values, what the model reads and who approves the release. Book a demo

Book a demo

Book a demo

Having trouble? Open the booking page or email us.