Skip to content
BuildThenTestedSee packages

Claude Code app security: defaults, what breaks, what to check

Claude Code is Anthropic's agentic coding tool that reads a codebase, edits files and runs commands from the terminal, IDE, desktop app or browser. Below: what it configures by default according to its own documentation (verified 2026-09-21), the 15 patterns most associated with it, the security features the vendor offers and where they stop, and a checklist you can run without buying anything.

Claude Code is a coding agent, not a hosting platform; hosting, database rules and payments are decided by the project it works in. Anthropic does not security-audit third-party MCP servers, per the security page.

Claude Code is Anthropic's coding agent for the terminal, IDE and browser. It works inside an existing project, does not host apps, and in Manual mode asks before editing files or running commands that modify the system. Permission rules can deny reads of .env files and other paths.

As with any coding agent, the app it helped write carries the patterns of its stack. The list here is the cross-stack set plus the agent-permission pattern: an agent with production credentials can do what any script with those credentials can do.

What Claude Code sets up by default

Each row is taken from the vendor's documentation on the date shown. Defaults change; the date is the claim.

Defaults of Claude Code as documented by the vendor
AreaDefaultSource
FrontendClaude Code works inside an existing project and does not choose a stack or host apps; it runs in the terminal, IDE extensions, a desktop app and the web.docs · verified 2026-09-21
Permission modeIn Manual mode Claude Code starts read-only and asks before file edits and before Bash commands that can modify the system. A built-in set of read-only commands such as ls and git status runs without asking. Which mode a session starts in depends on plan, surface and settings.docs · verified 2026-09-21
Working directory boundaryIn Manual mode it can only write to the folder where it started and its subfolders, and asks before reading paths outside that boundary.docs · verified 2026-09-21
Network accessCommands that fetch web content such as curl and wget are not auto-approved by default; web fetch uses an isolated context window.docs · verified 2026-09-21
Secrets / env varsAPI keys and tokens for Claude Code itself are stored in the macOS Keychain when available and protected by file permissions on Windows and Linux.docs · verified 2026-09-21
bypassPermissions modeSkips permission prompts, including writes to protected paths such as .git and .claude; the docs say to use it only in isolated environments such as containers or VMs. Organizations can disable it via settings.docs · verified 2026-09-21

Documentation home: code.claude.com/docs/en/overview

What breaks in Claude Code apps

52 patterns in the catalogue name Claude Code; the most severe are listed here across secrets and keys, data access, login and permissions, payments. Attribution is descriptive: the default stack makes the pattern reachable, or a public incident names it.

Public incidents

Lovable reported that from 3 February to 20 April 2026 a backend regression let any logged-in Lovable user read the chat history and source code of public projects; a fix shipped within two hours.

  • 2026-02-03 to 2026-04-20 Exposure window
  • 2026-02-22 First HackerOne report
  • about 2 hours Time from public report to fix

Apr 2026 · Lovable · all sources

One education app built on Lovable had 16 vulnerabilities, 6 critical; a database function denied callers whose role was 'authenticated', so anonymous callers passed and 18,697 user records were readable without login.

  • 16 Vulnerabilities found
  • 6 Critical
  • 18,697 User records exposed
  • 14,928 Unique email addresses
  • 870 Enterprise users with full PII

Feb 2026 · Taimur Khan · all sources

A scan of 1,645 Lovable-built apps found 170 (about 10.3%) with database endpoints readable without login because Supabase row-level security policies were missing or too broad; recorded as CVE-2025-48757, CVSS 9.3.

  • 1,645 Apps scanned
  • 170 Apps with inadequate RLS
  • 10.3% Share of scanned apps
  • 303 Exposed endpoints
  • 9.3 Critical CVSS 3.1 base score (CVE record)
  • 8.26 Researcher's own CVSS base score
  • 2025-03-21 Scan date
  • 2025-05-29 Public disclosure

May 2025 · Matt Palmer (Replit, Inc.) · all sources

Moltbook, a social network for AI agents built with AI-generated code, ran a Supabase database without row-level security policies, leaving 1.5 million API tokens and 35,000 email addresses readable and writable without login.

  • 1.5 million API authentication tokens exposed
  • 35,000 Email addresses exposed
  • about 17,000 Human account owners in database
  • 2026-01-31 Reported to maintainer
  • 2026-01-31 (within about 2 hours) First fix applied

Feb 2026 · Wiz Research · all sources

Each entry links to its primary source in the evidence list. What to do about it is the self-check below.

Claude Code's own security features, and where they stop

Stated from the vendor's documentation. The limits are the vendor's scope statements, not judgements.

  • Permission rules and modes

    Allow, ask and deny rules per tool, checked into version control or set as managed policy; modes include Manual, acceptEdits, plan, auto (classifier reviews actions) and bypassPermissions. Rules are enforced by Claude Code, not by the model.

    Where it stops: Deny rules match the command as written; exec wrappers and find with -exec always prompt, and the docs say you are responsible for reviewing proposed code and commands.

    vendor docs · verified 2026-09-21

  • Sandboxed Bash tool

    Filesystem and network isolation for Bash commands on macOS (Seatbelt), Linux and WSL2. By default commands can write only to the working directory, added directories and the session temp directory, and no network domains are pre-allowed.

    Where it stops: Not supported on native Windows or WSL1. Default read access covers the whole machine including credential files unless denyRead or credentials settings are added. The proxy does not inspect TLS by default. The docs state sandboxing is not a complete isolation boundary.

    vendor docs · verified 2026-09-21

  • Prompt injection safeguards

    Context-aware analysis, input sanitization, command injection detection, fail-closed matching in Manual mode, trust verification for new codebases and MCP servers.

    Where it stops: Trust verification is disabled with the -p flag; the docs state no system is completely immune to all attacks.

    vendor docs · verified 2026-09-21

  • Cloud session isolation

    Anthropic-hosted cloud sessions run in isolated VMs with network access limited by default, scoped credentials, push restricted to the working branch and audit logging.

    Where it stops: Self-hosted environments make isolation, egress and git credentials the deployment's responsibility; Remote Control sessions run locally without VMs or sandboxing.

    vendor docs · verified 2026-09-21

Check it yourself, in this order

The critical patterns first. Each uses the dashboard and your browser.

NEXT_PUBLIC_ prefix on a secret

  1. In your hosting dashboard (Vercel: Project, Settings, Environment Variables) or your .env files, list every variable whose name starts with NEXT_PUBLIC_.
  2. For each one, ask whether the provider calls that value secret, private, server or admin. Stripe secret keys, model provider keys, database passwords and Supabase service_role keys all fall in that group.
  3. Open the live site in Chrome, right-click, choose Inspect, open the Sources tab and press Ctrl+Shift+F. Search for the first few characters of each suspect value.
  4. A bad result is a NEXT_PUBLIC_ variable holding a server-only key, or a search hit for that key's value in a loaded script.

Secrets committed to the code repository

  1. Open your project on GitHub (or the code view in your builder) and look at the file list for .env, .env.local, .env.production, serviceAccountKey.json or firebase-adminsdk files.
  2. Use the repository search box and search for sk_live, sk-, service_role, BEGIN PRIVATE KEY and password=.
  3. If you have the code on your computer, run one command in the project folder: git log --all -p -S sk_live -- . | head. Any output means a live key has been committed at some point.
  4. On GitHub, open Settings, then Code security, and check whether Secret scanning shows alerts.
  5. A bad result is any env or key file in the file list, any search hit that shows a real key, or an open secret scanning alert.

Service-role key shipped in the browser bundle

  1. Open your live app in Chrome, right-click anywhere and choose Inspect, then open the Sources tab.
  2. Press Ctrl+Shift+F (Cmd+Option+F on a Mac) to search every loaded file. Search for service_role and then for sb_secret_.
  3. Open the Network tab, reload the page, click any request whose address contains supabase.co, and read the apikey header under Request Headers.
  4. In the Supabase dashboard, open Project Settings, then API Keys, and compare that header value with your keys.
  5. A bad result is any search hit, or a header value that matches the service_role or secret key rather than the anon or publishable key.

Claude Code pre-launch checklist

52 checks, in the order we run them. Usable without buying anything.

Self-check tool

Answer questions about your app and get the patterns that apply, ordered by severity. Runs in your browser; nothing is sent.

Run the self-check

Packages for Claude Code apps

Pre-launch check

Start here

For founders about to let real users in.

$490

Report in 48 hours
  • Keys and secrets in the browser or repo
  • Who can read and change whose data
  • Login, roles and admin routes
  • Errors, retries and rate limits
  • Debug mode, headers, deploy path

What you receive

Security sweep

For anyone who wants the three riskiest areas checked fast.

$290

Report in 24 hours
  • API keys and secrets in the bundle
  • Row-level rules on every table
  • Cross-user data reads
  • Admin and hidden routes
  • Client-only permission checks

What you receive

All packages and prices. Every report includes a re-check after your fixes.

Questions about Claude Code

claude code security

Claude Code documents permission modes, a sandboxed Bash tool, prompt-injection safeguards and isolated cloud sessions. Keep production credentials out of the working directory, use deny rules for secret files, and review generated database and auth code before deploying.

claude code app audit

We test the app the agent helped build, not the agent: permission checks, secrets, database rules, payments, error handling, and CI. Findings are written so you can paste the fix direction back into Claude Code.

is code written by claude code safe to deploy

Treat it like code from a fast new colleague: review the parts that touch money and personal data, and test them with a second account. The pre-launch check does that in 48 hours.