# Claude Code security: is it safe, and what can it check?

Claude Code is safe when you limit what it can touch and read what it does. Inside: the modes, the sandbox, the real risks, and the Claude Security scanners.

Tool: Claude. By Michel Lieben. Updated 2026-11-30. Source: https://coldiq.com/university/claude/claude-code-security

## In short

- Claude Code can run commands with your own rights, so its safety depends on the permission mode, the folder you open and what you connect to it.
- Auto mode, the normal start in the terminal, blocks risky actions such as deploying to production, force pushing or sending out sensitive data.
- The /sandbox command adds a wall around commands: it limits the files they can write and the sites they can reach.
- "Claude Code Security" is the old name of Claude Security, an Enterprise product that scans code for flaws. It was renamed on April 30, 2026.
- Anyone can run /security-review, or install the Claude Security plugin with a paid plan or an API account.

## Steps

1. Choose a permission mode you understand before you start.
2. Turn on the sandbox and keep secrets out of the folder.
3. Run /security-review before you put a change online.

## Is Claude Code safe to use, and where does your data go?

Claude Code is an agent (a tool that acts, not only answers). It reads files, edits them and runs commands on your computer. That is the point of it, and also the risk.

Anthropic builds protections in: permission rules, a sandbox, checks on folders you have not opened before, and safe storage of your login. It holds SOC 2 Type 2 and ISO 27001 reports, which you can request at trust.anthropic.com.

The rest is up to you. Open only the folders you need, know your permission mode, and read what it plans to run.

Your messages and the files Claude reads go to Anthropic so the model can answer. On Free, Pro, Max and Ultra, you can choose whether your data helps train models, at claude.ai/settings/privacy. Team, Enterprise and API accounts fall under commercial terms.

Your login is stored in the Keychain on a Mac. On Linux it is in a file only your user can read.


## How do the permission modes protect you?

A permission mode decides when Claude must ask. Press Shift+Tab to switch in the terminal.

- Manual: it reads, and asks before it edits or runs something.
- Plan: it studies and proposes, with no edits.
- Accept edits: it edits files without asking each time.
- Auto: it works alone, and a second AI check blocks risky actions.
- Bypass permissions: no checks. Anthropic says to use it only in a closed test machine.

Tip: The folder you open is a prompt, not a wall. Claude asks before it goes outside, but commands it runs can still reach further. Use the sandbox if you need a real limit.


## What does auto mode block?

Auto mode stops actions that are hard to undo. If it blocks three in a row, or 20 in total, it pauses and comes back to you.

- Running a script straight from the internet.
- Sending sensitive data outside, or printing live passwords and keys.
- Deploying to production or changing a live database.
- Deleting files in bulk, or destroying files that were there before.
- Changing access rights, force pushing code or merging unapproved changes.


## What is prompt injection, and how do you avoid it?

Prompt injection is a trap: text hidden in a web page, a file or an email that tells the AI to do something you did not ask. Claude Code has defenses against it, but no tool can promise to stop all of it.

Be careful with content from people you do not know. Do not paste a stranger’s command into Claude. Review what it wants to run after it reads a web page. Connect only MCP servers (outside tools) that you trust: Anthropic reviews the ones in its directory against listing rules, but it does not audit their security.


## How do you set up Claude Code safely?

Ten minutes is enough.

1. Type /permissions and read what is already allowed. Remove what you do not need.
2. Type /sandbox to limit files and network. It works on Mac, Linux and WSL 2, and not on Windows itself.
3. Keep passwords, keys and customer exports out of the folder you open.
4. Add a deny rule for .env (the file where keys often live). It blocks Claude’s file tools and common commands such as cat, but not every program that can read a file, so keep real secrets out of the folder.
5. Use a hook if something must be blocked every time, whatever the mode.
6. Keep Claude Code up to date.


## What is Claude Security, the former Claude Code Security?

Anthropic first showed a product called Claude Code Security. On April 30, 2026, it opened a public beta under the name Claude Security. It connects to your code, scans for flaws, checks each finding, and suggests fixes that a person approves.

As of November 2026, it is for Enterprise customers. It scans with a Claude Mythos model, and you pay the tokens with no platform fee. Anthropic wrote that Team and Max would come later.


## How can you check your code for flaws without Enterprise?

There are three lighter options inside Claude Code.

- /security-review: one pass over the changes on your branch (your working copy of the code).
- The security-guidance plugin, on all plans: it warns about risky patterns while Claude writes. It does not block anything.
- The Claude Security plugin, for paid plans and API accounts: several agents scan the project and write a report. It never applies a fix by itself.

Tip: A scan can miss things, and two scans of the same code can differ. For a site that takes payments or stores customer data, also ask a security person.


## What to say

> /security-review

## Sources

- [Claude Code security](https://code.claude.com/docs/en/security)
- [Permission modes](https://code.claude.com/docs/en/permission-modes)
- [Sandboxing](https://code.claude.com/docs/en/sandboxing)
- [Claude Security](https://claude.com/product/claude-security)
- [Claude Security is now in public beta](https://claude.com/blog/claude-security-public-beta)
- [Use Claude Security](https://support.claude.com/en/articles/14661296-use-claude-security)
- [Legal and compliance](https://code.claude.com/docs/en/legal-and-compliance)

## Questions

**Can Claude Code delete my files?** It can run a delete command if your mode allows it. Auto mode blocks mass deletion by default. Keep a backup or a copy of the folder.

**Does Claude Code train on my code?** On personal plans, you choose in your privacy settings. Team, Enterprise and API accounts are covered by commercial terms.

**Is Claude Code Security the same as Claude Security?** Yes. Claude Security is the current name of the product once called Claude Code Security.

**How do I report a security problem in Claude Code?** Anthropic takes reports through its HackerOne program. The form is linked from the Claude Code docs.


## Related

- [What is Claude Code?](https://coldiq.com/university/claude/what-is-claude-code)

## Try ColdIQ free

ColdIQ gives new accounts up to 1,450 free credits as they get started, no credit card required.
One subscription covers 40+ B2B data providers for finding, enriching and verifying
contacts and companies, through the web app, the API or the MCP server for AI agents.

1. Create an account: https://coldiq.com/marketplace/sign-up?utm_source=ai-assistant&utm_medium=markdown&utm_content=university
2. Run a first search on your own market with the free credits.
3. Connect the MCP server to Claude, ChatGPT or Cursor: https://coldiq.com/mcp
