Skip to content
ShipSafeStack

Checklist

Is Claude Code secure? What to check

Short answer. Claude Code is a coding agent in the repo and shell you opened. Its security page describes permission modes, a Bash sandbox, and prompt-injection checks. Those controls do not review the app it writes. The checks are which commands run without you, which secrets the shell can already see, and the diff before you commit.

Updated 27 Nov 2026

This is a practical checklist, not a guarantee. It is not a penetration test, a compliance audit, or proof that an app is safe to launch.

This page answers the question with the checks, not with a yes or a no. Claude Code does not host the app. The short list after the agent stops is Ship a Claude Code app. Claude Code is the directory entry. The same question for the desktop editors is Is Cursor secure? and Is Windsurf secure?. A leaked sk-ant- key is Leaked Anthropic key?.

Claude Code's pages below were read on 27 Nov 2026. Mode names and defaults move. If a step here disagrees with the page it links, follow that page.

What the security page covers

Claude Code's security page says the product is developed under Anthropic's security program, and it points at the Anthropic Trust Center for a SOC 2 Type 2 report and an ISO 27001 certificate. Those statements are about Anthropic. They do not tell you whether a route the agent wrote checks the caller.

The same page says you are responsible for reviewing proposed code and commands before you approve them. It also says the protections reduce risk and that you should still review what an AI tool proposes.

Permission prompts and allow or deny rules

A session's permission mode decides what runs without a prompt. The security page says Auto mode is the starting mode for interactive terminal and VS Code sessions. A separate classifier reviews actions and blocks the ones it judges unsafe. Your explicit ask and deny rules still apply, and an organization can turn Auto mode off.

Manual mode starts read-only. Edits, tests, and most commands ask first. You can approve once or allow the command from then on. A built-in set of read-only commands, including ls, cat, and git status, runs without asking. The permissions page lists more of that set, including grep, find, and read-only git. The set is not configurable. An ask or deny rule is how you force a prompt for one of those commands.

Accept edits auto-approves file edits inside the working directory and a fixed set of filesystem commands such as mkdir, rm, mv, and sed on those paths. Other commands, and paths outside that directory, still prompt.

Plan mode reads files and runs read-only shell commands. It does not edit source. Bypass permissions skips prompts, including writes to paths such as .git and .claude. The permissions page says to use that mode only in a container or VM. Managed settings can disable bypass mode and Auto mode.

Rules are deny, then ask, then allow. The first match wins. An allow rule cannot carve a hole in a deny rule. A bare deny such as Bash removes that tool. A scoped deny such as Bash(rm *) leaves the tool and blocks matching calls. Instructions in the prompt or in CLAUDE.md do not change these rules. The permissions page says the rules are enforced by Claude Code, not by the model.

Open /permissions to see every rule and which settings.json it came from. In Manual mode, file tools ask before they read or write outside the folder where you started Claude Code. A Bash command you approve can still write anywhere your user can. That boundary is a prompt, not an operating-system limit, until the sandbox is on.

In Manual mode, commands such as curl and wget prompt by default. A deny rule matches the command text. It does not, by itself, stop a different program from opening a network connection. For that, use the sandbox.

The Bash sandbox

The sandbox page says the Bash sandbox is off by default. Turn it on with /sandbox, or set sandbox.enabled to true in a settings file such as ~/.claude/settings.json. It wraps shell commands and the processes they start. It does not wrap Read, Edit, Write, WebFetch, WebSearch, hooks, local MCP servers, or plugins. Those run with your user's access and follow permission rules instead.

While the sandbox is on, writes default to the working directory and a temp directory. Reads default to most of the machine, including files such as ~/.ssh and ~/.aws/credentials, until you deny those paths. Network connections go through a proxy. The allowed-domain list starts empty. Environment variables are inherited from Claude Code, including secrets already in that environment. Do not start a session in a shell that has production keys loaded.

The sandbox environments page says isolation reduces the impact of a breach and does not eliminate it. A sandbox that can open the network can still send data the agent can read. A writable project directory can still be modified. The same page says a sandbox does not change what is sent to the model: prompts and files Claude reads are transmitted to the Anthropic API or the provider you configured, with or without a sandbox.

Prompt injection and MCP servers

The security page describes prompt injection as text that tries to override the assistant's instructions. In Manual mode, sensitive operations still need approval, and a command Claude Code cannot fully parse asks before it runs. An allow rule for part of a command, such as Bash(git *), does not skip that prompt. For most WebFetch calls, a separate model call summarizes the page, and Claude receives that summary instead of the raw page.

Anthropic's list for untrusted content is: review commands before you approve them, do not pipe untrusted content straight into Claude, check edits to critical files, and use a VM when the session talks to external web services.

MCP servers are extra tools. Project servers live in .mcp.json, which can be committed. Other scopes, claude.ai connectors, and plugins can add servers that file does not list. The security page says to write your own servers or use providers you trust, and that you can set permissions on them. Anthropic reviews connectors against its listing criteria before the directory, and it does not operate those servers. A hook is a shell command that runs with your user permissions. A PreToolUse hook can deny a call or force a prompt. It cannot override a deny or ask rule.

What is sent, and what is stored on disk

Claude Code's data usage page says local Claude Code sends prompts and model outputs over TLS. Consumer plans (Free, Pro, Max, Ultra) train on that data only when the training setting is on, including Claude Code use. The switch is at claude.ai/settings/data-privacy-controls. Team, Enterprise, and API terms do not train on code or prompts unless the customer opts in, for example through the Development Partner Program. That program is first-party API only, not Bedrock or Google Cloud's Agent Platform.

Local transcripts sit in plaintext under ~/.claude/projects/ for 30 days by default, so a session can resume. cleanupPeriodDays changes that. /feedback, /bug, and /share send a transcript you choose to include, and those reports are kept for 5 years. A session-quality rating does not upload the transcript. A later question can, and only if you choose Yes. Known API-key patterns are redacted on that upload. Source code in the transcript is not.

Zero Data Retention is a separate Enterprise arrangement. It is not in the standard Enterprise plan and is not a switch in admin settings. Anthropic enables it per organization after confirming eligibility.

What you still check in the repo

Permission prompts do not review the app. Before you commit:

FAQ

Does Auto mode mean every command is reviewed by a person?

No. Claude Code's security page says Auto mode is the starting mode for interactive terminal and VS Code sessions, and that a classifier reviews actions instead of you. Ask and deny rules you wrote still apply. Manual mode is the one that asks before edits and most commands. An organization can turn Auto mode off.

Does the Bash sandbox cover file reads and MCP?

No. The sandbox page says it wraps shell commands only, and that it is off until you enable it. Read, Edit, hooks, and local MCP servers run outside it. Reads inside the sandbox can still reach credential files unless you deny those paths. A sandbox also does not stop prompts and file contents from being sent to the model.

Will CLAUDE.md stop a dangerous command?

No. The permissions page says prompt text and CLAUDE.md shape what Claude tries. They do not change deny, ask, or allow rules. Put the block in /permissions or in settings. A PreToolUse hook can deny a call, and it cannot override a deny or ask rule that already matches.

Where is the rest of the Claude Code list?

Ship a Claude Code app is the short version. Claude Code is the directory entry. A key that already left the machine is Leaked Anthropic key?. The general pass is the pre-launch checklist.

Sources

Checked 27 Nov 2026.

Informational only. This page describes checks and vendor documentation. It is not a security audit, a penetration test, or a certification, and it is not a guarantee.

Newsletter

A short weekly note on new tools and security checklists. No spam, unsubscribe anytime.