Most Comprehensive IDE Enforcement

Secure Windsurf Cascade

Cascade writes code autonomously, runs commands, and connects to external tools. Agent Keeper intercepts every action — with the most comprehensive enforcement of any AI coding IDE.

No credit card required · Free tier forever · One command setup

Cascade actions — all covered

ActionHookStatus
Shell commandspre_run_commandBlocked
File writesIDE-uniquepre_write_codeBlocked
File readspre_read_codeBlocked
MCP tool callspre_mcp_tool_useBlocked
User promptspre_user_promptBlocked

Windsurf has the most comprehensive hook system of any AI coding IDE. Agent Keeper leverages every pre-hook to block threats before they execute.

Cascade operates with full autonomy

That's what makes it powerful. It's also what makes it a security surface.

Cascade can

Write and modify any file in your project
Run terminal commands autonomously
Read your source code and configuration
Call MCP tools and external integrations
Process user prompts and file content as context
Chain multiple actions across a single session

Autonomous code generation needs guardrails. Agent Keeper provides them.

Writes happen before you look

Cascade can write any file in your project autonomously. Without pre-write enforcement, secrets end up committed, reverse shells get saved to disk, and config files get corrupted — all before you notice.

Zero visibility into agent actions

Cascade runs terminal commands, reads source files, and calls MCP tools on your behalf. Without hooks, you have no audit trail — just a git diff after the fact.

Prompt injection via file content

Cascade reads files and processes their content as context. Malicious instructions embedded in source files, configs, or dependencies can redirect the agent's behavior.

Why Windsurf enforcement is different

Most IDEs only let you audit after the fact. Windsurf's hook system gives Agent Keeper the ability to block before anything happens.

Windsurf exclusive
pre_write_code

Block file writes before they happen

Agent Keeper scans the file content Cascade is about to write. Reverse shells in bash scripts, API keys hardcoded in configs, malicious npm install hooks — all caught and blocked before the file ever touches disk.

Pre-execution
pre_user_prompt

Stop prompt injection before Cascade processes it

Cascade reads your files and feeds them as context. Malicious instructions embedded in source code, package.json scripts, or even markdown docs can hijack the agent. pre_user_prompt intercepts this before Cascade acts.

Reliable
exit code 2

Clean enforcement via exit code 2

Windsurf's hook system uses exit code 2 as a reliable blocking signal. Agent Keeper returns exit code 2 to halt any action outright — no partial writes, no partial command execution. Clean and deterministic.

How it works

Four steps from install to full coverage.

1

Install in one command

Run the Agent Keeper installer with the Windsurf target. Hooks are registered in Cascade's lifecycle — no manual config required.

bash <(curl -fsSL https://www.agentkeeper.dev/install-hooks.sh) --ide windsurf
2

Hooks integrate with Cascade's lifecycle

Agent Keeper registers on every Windsurf pre-hook — covering prompts, file reads, file writes, shell commands, and MCP calls.

pre_run_command

Shell commands

pre_write_code

File writes

pre_read_code

File reads

pre_mcp_tool_use

MCP tool calls

pre_user_prompt

User prompts

3

30+ threat patterns scan every action in <100ms

Behavioral detection tuned for zero false positives on normal development. Dangerous actions are stopped with exit code 2 before they execute.

Credential exfiltrationReverse shellsCI/CD tamperingPrompt injectionSecurity control bypassSupply chain attacksSensitive file accessNetwork data exfiltration
4

Blocked actions show a clear error to Cascade

When a hook blocks an action, Cascade receives a descriptive error message — and the event is logged to your Agent Keeper dashboard with full context.

97%

Compliance

18

Developers

89

Threats Blocked

2.4k

File Writes Scanned

Built for security teams

Every feature designed to give you control without slowing your developers down.

Pre-Write File Scanning

Unique to Windsurf: scan file content before it's written to disk. Catches secrets, malicious scripts, and dangerous patterns in generated code before they become a problem.

Prompt Injection Detection

pre_user_prompt hook scans every prompt before Cascade processes it. Catches social engineering, jailbreaks, and embedded instructions in file content that Cascade reads as context.

MCP Tool Policy Control

Allow, warn, or block specific MCP tool calls per org. Control which external integrations Cascade can invoke and log every call to your audit trail.

Shell Command Enforcement

pre_run_command intercepts every terminal command before execution. Prevent rm -rf, curl | bash, and other dangerous patterns from running autonomously.

Complete Audit Trail

Every prompt, file write, shell command, and MCP call logged with timestamps, session context, and user identity. Full forensic trail for incident response.

Fleet Compliance Dashboard

Windsurf version, hooks active, threats blocked — per developer. One view for your entire Cascade fleet's security posture.

How Windsurf compares to other IDEs

Windsurf's hook system is the most comprehensive. Agent Keeper makes full use of every capability.

CapabilityCursorWindsurf + Agent Keeper
Shell command blocking
File write blocking (pre-write)unique to Windsurf
File read blocking
MCP tool call blocking
Prompt injection blocking
Fleet compliance dashboard
Complete audit trail
Custom org policies
30+ threat patterns

One limitation — we're transparent about it

Windsurf's hook system uses exit codes for blocking — it cannot inject warning context back to the Cascade agent. In warn mode, detections are logged to your dashboard but Cascade is not notified of the detection. Block mode (exit code 2) is fully effective and stops the action outright.

Simple, transparent pricing

Start free — no credit card required. Scale when you need to.

Free

For individual developers

$0forever
  • 1 workstation
  • Full monitoring
  • All detection patterns
  • 7-day history
Most Popular

Pro

For small teams

$19/mo
  • 3 workstations
  • Custom policies
  • 90-day audit log
  • MCP tool controls
  • Email alerts

Team

For security teams

$29/seat/mo
  • Unlimited workstations
  • Fleet dashboard
  • Compliance reporting
  • File write policy rules
  • RBAC & webhook alerts
  • Priority support

Need enterprise features? Contact us for enterprise pricing

One command. Full coverage.

Every Cascade action covered — prompts, file writes, shell commands, MCP calls. The most comprehensive enforcement of any AI coding IDE.

bash <(curl -fsSL https://www.agentkeeper.dev/install-hooks.sh) --ide windsurf

No credit card required · Setup in under a minute