Guide · AI security · as of 15 November 2026

Your AI coding tool may be keeping your passwords in plain text. Two cases this month, four checks.

AI coding tools such as Claude Code and Cursor write things down as they work: the commands you approve, the steps the agent took, the files it read. If a password or an API key passes through, it can end up in those notes in plain text. Two cases this month show where that goes. In one, a company’s own records of agent sessions were copied, and the keys inside them were used to go further. In the other, researchers found secrets in public copies of a Claude Code settings file. This guide works from the vendors’ own pages and ends with four checks.

Case one

Cursor, 13 November 2026

Agent records copied, keys inside them used.

Cursor says an attacker got hold of an access key it had issued to one of its AI vendors and used it to copy a store of coding agent records, mostly from 2025, from sessions that were not in Privacy Mode. Some of those records still held credentials. Cursor puts the share of customers with API credentials exposed at under 0.01%. The attacker then reached some of Cursor’s internal tools and, on 29 October, placed a tampered copy of the Claude Code extension in Cursor’s extension store for about 11 hours. Cursor says Anthropic did not publish that copy, that at most 5,000 users could have received it, and that uninstalling it alone may not be enough.

Case two

Claude Code settings files

Approved once, saved as typed.

When Claude Code asks to run a command and you choose “Yes, and don’t ask again”, it saves that command as a rule in a file called .claude/settings.local.json. Anthropic’s documentation says so. If the command you approved had a password typed into it, the password is saved with it. A bug report describing exactly this was filed in August 2025. Claude Code keeps that file out of git when it creates it. But a file made by hand, or one swept up by a careless commit, can still be published. The security firm Apiiro reported on 6 November that 1,122 of the 104,185 public copies it examined held secrets. We could not open Apiiro’s page directly, so that figure comes through the Cloud Security Alliance’s summary of it.

Claude Code security settings: what Anthropic now checks

Four checks for any team that codes with AI

Ask your developers to run these.

  • 1. Find every settings file and ask git about it. Test: in each project, git ls-files .claude/settings.local.json should print nothing, and git log --all on the same path should show no commits. If either shows something, treat every secret in it as leaked.
  • 2. Rotate first, clean up second. A key that was public for an hour is a public key. Test: for each secret found, confirm the old value no longer works before you delete the file or rewrite history.
  • 3. Keep secrets out of the commands an agent sees. Put them in environment variables or a secrets manager, and approve patterns such as npm run test, not one long command with a password in it. Test: search the allow rules in every settings file for anything that looks like a key or a password.
  • 4. Treat agent records as sensitive data. Session logs, traces and transcripts can hold whatever passed through them. Test: list where your tools keep them, who can read them, which vendors receive them, and whether privacy or no-retention modes are on.

What we checked on our own

We code with Claude Code every day. So we looked.

On 15 November 2026 we searched our main development machine. We found 2 local settings files and 5 shared ones, and none held anything that looked like a key, token or password. Neither local file is tracked by git, and across 208 repositories on the machine the local file appears in git history zero times. That is one machine, checked by pattern, so it sets a floor, not proof that nothing ever leaked. The habit that kept it clean is boring: secrets live in a vault and in environment variables, never in a command we approve.

AI agents for Dubai businesses

Questions

Questions about AI coding tools and secrets.

  • What is .claude/settings.local.json?

    A personal settings file Claude Code keeps in each project. When you approve a command with “Yes, and don’t ask again”, Claude Code saves that command there as an allow rule, word for word.

  • Does Claude Code commit that file to git?

    Not by itself. Anthropic’s documentation says Claude Code adds the file to your global git ignore list the first time it writes it. If you created the file by hand, or your setup does not use the global ignore list, you have to ignore it yourself.

  • Was I affected by the Cursor incident?

    Cursor says customers who were not notified were not in the exposed records, and that users of Privacy Mode were not affected. If you installed or updated the Claude Code extension in Cursor to version 2.1.312 or 2.1.313 on 29 October, follow Cursor’s security notice.

  • Is this a reason to stop using AI coding tools?

    No. It is a reason to treat what they write down like any other log that can hold secrets. Keep secrets out of commands, keep their files out of git, and know which vendors receive your agent sessions.

  • What should I do first?

    Run check one in every project. It takes a minute per project and tells you whether the rest is urgent.

Sources

read 15 November 2026

Check it at the source.

  1. Cursor: An update on our recent security incident (13 November 2026) (how the key was obtained, what was in the records, the extension versions and what to do)
  2. Claude Code documentation: settings files (what “don’t ask again” writes, and how the local file is kept out of git)
  3. GitHub issue 5544: approved commands stored with plain text credentials (the original report, filed August 2025)
  4. Cloud Security Alliance research note (8 November 2026) (its summary of Apiiro’s figures, and its own advice)
  5. Apiiro: the original research (linked for completeness; the page refused our request when we checked)

A question?

Your team codes with AI?

Tell us which tools your developers use. We will run these four checks with them, set up a vault for the secrets, and leave you with the rules that keep it clean.

Talk to usWhatsApp +971 50 728 5494hello@brevdigital.com