You want full speed.
Not a deleted home directory.
--dangerously-skip-permissions makes Claude Code a surgical instrument or a wrecking ball. The problem:
nothing between "100 permission prompts per hour" and "no guardrails at all."
Certiv is that middle ground.
Claude Code security means controlling what an autonomous coding agent can execute: which commands run, which files and credentials it can touch, which MCP servers it can call, and what happens in permissive modes. Certiv adds pre-execution policy enforcement to Claude Code, checking every generated command against policy before it runs, so teams get full autonomous speed without the catastrophic tail.
Every Claude Code power user faces the same impossible choice
Neither works. Certiv removes the dilemma.
Without --dangerously-skip-permissions
- CLI tools blocked by constant permission prompts
- Production environments need autonomous operation
- You rubber-stamp approvals without reading
- Autonomous runs constantly interrupted
- CI/CD pipelines broken by prompt pauses
With --dangerously-skip-permissions
- Zero friction, but zero guardrails
- rm -rf ~/ can delete your entire home dir
- No logging of what Claude actually did
- Prompt injection acts with root authority
- Repo config can RCE before you approve
- API keys exfiltrated silently
With Certiv, YOLO mode keeps its speed: safe actions auto-approve instantly, dangerous ones are blocked before they execute, and every command lands in the audit trail. The permission modes below show why the built-in options cannot give you both.
Claude Code has six permission modes. Each has a gap.
Claude Code's permission model is genuinely better than most coding agents ship with: per-tool approval, a planning mode, a classifier-screened auto mode, allow/ask/deny rules, hooks, and enterprise managed settings. The problem is the same one every approval system has: the mode teams need for real work is the mode with the least protection.
default Manual Claude Code prompts on the first use of each tool: file edits, commands, web fetches. Reads are free; nothing consequential runs without a yes.
The gap: At real working pace that is dozens of prompts an hour. Developers stop reading them, and an approval you did not read is not a control.
plan Plan first Claude Code reads files and runs read-only exploration commands to write a plan, but does not edit your source until you approve.
The gap: Ideal for review and scoping, but planning is not execution. The moment work starts, you are back in one of the other modes.
acceptEdits Auto-edits File edits auto-approve, and so do filesystem commands in the working directory: mkdir, mv, cp, sed, and rm. Other commands still prompt.
The gap: The auto-approved list includes rm, and the working directory is where your work lives. And an "edit" to a hook or CI file is code that runs later, promptless.
auto Classifier-gated Everything runs without prompting while a model-based safety check screens each action and pulls back the ones it judges risky.
The gap: The screen is probabilistic, not policy. It shares the blind spots of the model it guards, and it knows nothing about your org’s rules.
dontAsk Allowlist-only Nothing prompts: actions matching your permissions.allow rules run, and everything else is declined instead of asked.
The gap: A hand-maintained allowlist ossifies. Teams widen it every time it blocks real work, until it quietly approximates bypass.
bypassPermissions YOLO mode The --dangerously-skip-permissions flag: every action executes with no prompts and no checks. The mode autonomous runs and CI actually use.
The gap: One flag removes every guardrail on a machine with real credentials. Every documented wipe incident on this page happened here.
And the config surface around them
permissions.allow / permissions.deny rules Rules match command strings, and string matching is easy to sidestep: a denied curl invocation comes back base64-wrapped, aliased, or split across a script. Anthropic documents Bash rule matching as best-effort.
Hooks (PreToolUse and friends) Hooks can gate tool calls with your own logic, but repo-level hooks are attacker surface too: CVE-2025-59536 executed a malicious repo hook before the trust prompt ever appeared.
Managed settings (MDM / IT-deployed) Enterprise managed settings can pin modes and disable bypass and auto fleet-wide, and developers cannot override them locally. They govern which mode runs, not what any individual command does inside it.
Devcontainers and OS sandboxing Isolation raises the bar and shrinks the blast radius. But the credentials, repos, and network access inside the boundary are exactly what the agent needs to work, so damage inside the box is still damage.
Where Certiv fits: rather than forcing the choice between prompt fatigue and no prompts at all, Certiv authorizes each action on its merits. Teams run the mode they need, including --dangerously-skip-permissions, while every command, file edit, and MCP call is still checked against policy before it executes.
Documented incidents. Real developers. Real damage.
From the Claude Code community, 2025-2026.
The home directory wipe
CC was asked to clean a repo. It generated rm -rf tests/ patches/ plan/ ~/. That trailing ~/ wiped the home directory: Desktop, Keychain, app data. Gone.
r/ClaudeAI incident · December 2025Firmware project → system wipe
Mike Wolak watched Claude execute rm -rf / on Ubuntu/WSL2. Logs: thousands of "Permission denied" for /bin, /boot, /etc. Every user-owned file gone. Never appeared in the conversation.
GitHub issue #10077 · Anthropic tagged area:securityRepo clone → instant RCE
Cloning a malicious repo and launching Claude Code triggers arbitrary shell commands via Hooks. Before the trust prompt. No interaction required.
CVE-2025-59536 · CVSS 8.7 · Check Point Research 2026API key theft on open
ANTHROPIC_BASE_URL in a repo config redirects API traffic to attacker infrastructure before the trust dialog. Active API key exfiltrated silently.
CVE-2026-21852 · Anthropic advisory · no interaction neededLive on camera: Claude Cowork deletes 11GB
James McAulay benchmarked folder organisation with instructions to retain user data. Cowork ran rm -rf, deleting ~11GB. Task list: "Delete user data folder: Completed." Posted on X. Everything gone. Live.
X (Twitter) · James McAulay · January 20266 attack surfaces Claude Code opens up
Documented, recurring patterns affecting teams deploying Claude Code at scale.
Repo config injection (RCE)
A malicious .claude/settings.json executes shell commands when a developer opens the project. One insider poisons the config; every teammate gets hit.
CVE-2025-59536 · CVSS 8.7API key exfiltration
Project configs redirect Claude's API traffic to attacker servers before the trust prompt. One stolen key accesses your entire workspace.
CVE-2026-21852 · no user interactionIndirect prompt injection
1pt white-on-white text in a .docx manipulates CC into uploading files to an attacker via the Anthropic API. Demonstrated by PromptArmor, January 2026. No special permissions.
OWASP LLM Top 10 · in-the-wildMCP trust boundary abuse
enableAllProjectMcpServers: true is a consent bypass. Any contributor can inject an MCP server that silently acquires filesystem, database, or Slack access. No approval dialog.
High severity · widely deployedScope creep & destructive drift
Without malicious input, CC "helps" by modifying files outside scope: removing system config, rewriting CI pipelines, deleting test directories. No injection required. Just AI helpfulness.
Permission noise → rubber-stampingCI/CD pipeline poisoning
CC modifying CI scripts can change build steps to exfiltrate artifacts and introduce auth bypasses. Changes scatter across files, framed as "cleanup," slipping through PR reviews.
Supply chain · enterprise-criticalThree policy layers. Pre-execution. Every time.
Certiv intercepts before execution. Not a log you read after the damage.
Hard rules, zero LLM in the loop
Enforced in microseconds. No LLM means no prompt injection.
- Block rm -rf ~/ and rm -rf / variants
- Deny ANTHROPIC_BASE_URL env overrides
- Block MCP auto-approval in untrusted repos
- Prevent writes to ~/.ssh, ~/.aws
- Enforce tool allowlists in bypass mode
Pattern-aware content scanning
Catches obfuscated attacks and hidden-text injection that regex misses.
- Scan docs for hidden prompt injection
- Detect credential aggregation patterns
- Flag outbound data exfil signatures
- Audit repo config before session start
- Catch scope creep before execution
Divergence detection
Compares your intent to Claude's next action. Blocks divergence. Escalates when it matters.
- Task scope vs. action scope diff
- Privilege escalation detection
- Git operation audit (commit hygiene)
- Human approval for CI/CD file edits
- Lineage trail: intent → execution
What Certiv actually does in practice
What gets blocked, escalated, and what runs free.
Home directory deletion - rm -rf ~/
Deterministic BlockedMalicious repo config - API redirect + RCE
Deterministic BlockedHidden prompt injection in .docx
Semantic BlockedCI/CD pipeline edit during refactor
Intent-based EscalatedLegitimate full-speed autonomous refactor
All layers PassedThe Claude Code enterprise security checklist
One careful developer reads every diff. A fleet of hundreds of Claude Code seats cannot. These are the six controls to secure Claude Code at enterprise scale. Certiv delivers all six from one endpoint agent.
Govern permission modes
Know who runs --dangerously-skip-permissions and where. Policy should decide which environments allow bypass mode, not individual developers. And bypass mode should mean "Certiv enforces instead", not "nothing enforces".
Scan repo configs before session start
Malicious .claude/settings.json files execute commands on open (CVE-2025-59536) and redirect API traffic to attacker servers (CVE-2026-21852). Every repo config needs scanning before Claude Code loads it.
Claude Code MCP security
enableAllProjectMcpServers: true auto-approves every MCP server a repo declares. Audit MCP servers before they load, and authorize each MCP tool call at execution, not once at install.
Protect secrets and credentials
Generated commands should never read ~/.ssh, ~/.aws, or .env files. Prompt injection in a document is all it takes to turn "summarize this file" into credential exfiltration.
Keep humans on high-impact actions
CI/CD file edits, deploys, bulk deletions, and outbound data transfers should pause for approval, even in fully autonomous runs. Everything else proceeds at full speed.
Record every session
A complete lineage from prompt to every executed command, with verdicts. This is the audit trail security teams need for incident response, and the evidence trail compliance needs.
FAQClaude Code security questions
Expand to view common questions.
Claude Code security questions
Expand to view common questions.
Is Claude Code safe to use?
How do I secure Claude Code?
What is --dangerously-skip-permissions, and is it safe?
What are Claude Code permission modes?
Can Claude Code delete files or damage my system?
How do I secure MCP servers in Claude Code?
What does Claude Code enterprise security require beyond individual developer caution?
Does Certiv slow Claude Code down?
Ship at full speed.
Keep your home directory.
Smart Claude Code developers ship with guardrails.
Keep reading
Codex security
The companion page for OpenAI Codex: sandbox modes, CVEs, and the controls that make full access safe.
For security teams
The six controls to evaluate when rolling out Claude Code and other AI agents across an organization.
The Lethal Trifecta
Private data + untrusted input + external calls: the attack pattern behind most Claude Code exploits.
What is Runtime Assurance?
The category behind the controls on this page: authorize every agent action before it executes.