A 10-minute security check before you let AI act for you
In two weeks, two things happened to people using Claude Code: a "don't ask again" file put passwords into 1,122 public GitHub files, and a fake Claude Code extension on Cursor's marketplace tried to plant an SSH backdoor. Most coverage tells you what happened. This canvas is the checklist: the 3 places your keys leak from, and 10 minutes to check each. Gathered from the researchers' reports and official docs, rewritten in plain words.
Start here
How to use this canvas
- Three leak points, one group each: the approvals file, keys in your project, and extensions.
- Each group: what happened, a check you can do in a few minutes, and the fix.
- No security background needed. If a step needs the terminal, the command is on the card.
Why now
- 2026-11-06: Apiiro reported that Claude Code's "Yes, and don't ask again" saves the full approved command into a project file. In 1,122 public copies of that file on GitHub, the commands contained passwords or keys (1,379 distinct secrets).
- 2026-10-29: a trojanized "Claude Code" extension, version 2.1.313, was on Cursor's marketplace for about 11 hours, exposing up to 5,000 developers (reports didn't give an install count). It added an attacker's SSH key to the computer.
- Neither needed you to do anything unusual. Both came from clicking "yes" once.
What you'll end with
- Your approvals file checked and kept out of git.
- No passwords or keys typed straight into commands or files you share.
- A short list of extensions you trust, and no strange SSH keys on your machine.
- A rule for what AI can do without asking, and what it must always ask about.
Leak point 1: the "don't ask again" file
What happened
- When you pick "Yes, and don't ask again", Claude Code saves an allow rule in .claude/settings.local.json inside your project.
- For an exact command, the whole command is saved, including any password or token you typed into it, in plain text.
- According to Apiiro, Claude Code hides that file from git only through your computer's global git settings, not the project's .gitignore. So on another computer, or if your global settings change, the file can get committed and pushed. Add it to the project's .gitignore yourself.
Check it (3 minutes)
In each project folder:
cat .claude/settings.local.json
git log --all --oneline -- .claude/settings.local.json .claude/settings.json
The first line shows your saved rules. Look for anything that looks like a password, a token or a database address. The second shows whether the file was ever committed. If it prints nothing, it wasn't.
Fix it, in this order
1. If a secret was ever in a committed file: rotate it first (make a new key, revoke the old one). Deleting the file doesn't un-leak it.
2. Remove it from git and keep it out: `git rm --cached .claude/settings.local.json`, then add that path to the project's .gitignore.
3. Delete any rule that contains a secret.
4. Next time, put the secret in an environment variable and approve the command with the variable name (like $DB_URL), not the value.
5. Approve patterns, not one-off commands: a rule like Bash(npm run test:*) never contains a password.
Leak point 2: keys in your project
The usual suspects
- A .env file that isn't in .gitignore.
- A key pasted into code "just to test".
- A key pasted into a chat with an AI that then writes it into a file.
Common secret scanners miss a lot of these, because passwords inside commands don't look like normal key formats. Of the 1,122 files, gitleaks flagged 564, TruffleHog flagged 643, and 215 were flagged by neither. So don't rely on a scanner alone.
Ask Claude to check, without printing secrets
Check this project for hard-coded secrets: passwords, API keys, tokens, private keys and database URLs with passwords in them, in every file and in .claude/. For each one, give the file and line and what kind of secret it looks like. Don't print the secret itself. Then check that .env and .claude/settings.local.json are in .gitignore.
Then rotate anything it finds that was ever committed or shared.
Turn on GitHub's own guard
- In each repository: Settings, then "Code security" (some accounts show "Advanced Security"), then turn on secret scanning and push protection. Push protection blocks a push that contains a known key format.
- It's free for public repositories. For private ones, check your GitHub plan.
- It still won't catch every password in a command (see the card above). Use it as a second net, not the only one.
Leak point 3: extensions and plugins
What happened
- The fake extension was named "Claude Code", version 2.1.313. Anthropic didn't make it. Cursor removed it, paused its marketplace and rotated keys.
- On load, it collected your system info, Git email and IP address, added an attacker's SSH key, and tried to keep itself running after restart. It didn't steal passwords directly, but it sent out the names of environment variables linked to credentials.
- Researchers found bugs in it that probably stopped the SSH access on many machines. You still want to check.
Check your machine (3 minutes)
1. Open ~/.ssh/authorized_keys. Every line should be a key you added. Cursor told users to look for one named svc-telemetry.
2. In your editor, list installed extensions. Remove anything you don't use, and anything whose publisher you don't recognise.
3. On a Mac, it restarted itself through a LaunchAgent. Open ~/Library/LaunchAgents in Finder (Go, then Go to Folder) and look for anything you don't recognise.
4. If you find something wrong: disconnect that machine, follow the editor's instructions, and rotate every key that machine could reach.
Three rules for installing
- Install AI extensions from the official source the tool's own docs link to, not from a search result.
- Check the publisher name and the install count before you click.
- Don't auto-update extensions on the machine that holds your important keys. Update on purpose, after the news has had a day.
What AI may do without asking / Honest bit
Look at what you've already allowed
In Claude Code, type /permissions to see every allow rule in one list. Remove anything that deletes files, pushes code, spends money or contains a secret.
A safe default
| Let it run | Always ask me |
|---|---|
| Reading files | Deleting anything |
| Running tests | git push, publishing, deploying |
| Formatting and linting | Anything that sends email or messages |
| Searching the project | Anything that costs money or uses a secret |
Our guide "Approve only the last step" goes deeper on this: https://puthere.space/collections/approve-only-the-last-step-en?ref=guide-ai-agent-safety-check
Limits worth knowing
- This is a checklist, not a security audit. For a company with customer data, get a real review.
- The numbers come from Apiiro's research and news reports in 2026-11; they didn't test whether the leaked keys still worked.
- We found no public fix from Anthropic for the approvals file at the time of writing (2026-11). Check the Claude Code release notes for changes.
- Menu names in GitHub and editors move around. If one doesn't match, search the tool's help for "secret scanning" or "extensions".
Try it this week / Sources
Do the 10-minute version today
Run the two commands in "Check it" in your busiest project, open ~/.ssh/authorized_keys, and type /permissions in Claude Code. If all three look clean, you're done for now.
Keep the checklist on one canvas
Put the three leak points and your "let it run / always ask me" table as cards on one put·here canvas, and tick them each month. Download put·here for Mac: https://puthere.space/?ref=guide-ai-agent-safety-check · iPhone: https://apps.apple.com/app/id6823383945?ct=guide-ai-agent-safety-check
Sources
- The Hacker News, "Claude Code's 'Don't Ask Again' File Exposes Passwords and Keys in 1,122 Public Copies on GitHub" (third party; 2026-11), reporting Apiiro's research. File path, numbers, scanner misses, fixes. https://thehackernews.com/2026/11/claude-codes-dont-ask-again-file.html
- BleepingComputer, "Malicious Claude Code extension on Cursor planted SSH backdoors" (third party; 2026-10). Version, timing, what it did, what to check. https://www.bleepingcomputer.com/news/security/malicious-claude-code-extension-on-cursor-planted-ssh-backdoors/
- Claude Code docs, permissions (official; checked 2026-11). /permissions to view and manage rules; "don't ask again" rules saved to .claude/settings.local.json. https://code.claude.com/docs/en/permissions
- Claude Code docs, settings (official; checked 2026-11). Settings files and where they live. https://code.claude.com/docs/en/settings
- GitHub docs, secret scanning and push protection (official; checked 2026-11). https://docs.github.com/en/code-security/secret-scanning