Calendar Icon White
November 24, 2026
Clock Icon
8
 min read

Windsurf Security: Turn On the Hook Layer First

Windsurf ships a hook layer and it is off by default, which is the single most important thing to know. What to enable, what to block, and how Windsurf fits a mixed-agent fleet.

Windsurf Security: Turn On the Hook Layer First
ChatGPT
Perplexity
Grok
Google AI
Claude
Summarize and analyze this article with:

TL;DR

Windsurf is an agentic IDE, so its reach is the repository plus the shell plus whatever MCP servers are configured. One fact dominates the security conversation and it is worth stating before anything else.

The mechanism itself, including the exit codes and a working script, is on Claude Code hooks and runs in Windsurf with the same logic. This page covers what is specific to Windsurf.

What is different about Windsurf

Windsurf's hook layer is off by default. It ships from version 3.5.17, and until someone turns it on there is no checkpoint, regardless of what is written in any settings file. Every other agent in this cluster has its hook path active once configured; Windsurf needs the feature enabled first. We have not verified the behaviour live ourselves, so treat the mechanics as the vendor documents them and confirm on your own build before relying on it.

The practical risk is a false sense of coverage: a team rolls a blocklist across the fleet, sees it working in Claude Code and Cursor, and assumes Windsurf is covered too. Check that one explicitly.

✨ Where the checkpoint sits

Diagram of a PreToolUse hook between an agent and its tool call
The same checkpoint in Windsurf: the agent asks, your code decides, the call runs or it does not.

Windsurf supports this from version 3.5.17. The event names and the config file differ between agents; the decision point does not.

AgentMinimum versionNotes
Claude Code2.1.296The reference implementation. PreToolUse, PostToolUse, UserPromptSubmit and the rest.
Cursor1.7.0Reads Claude Code's hook format and maps it onto its own events.
Codex0.145.0Its own hook layer with equivalent before and after points.
GitHub Copilot CLI1.0.57Hook support on the CLI surface.
Gemini CLI0.27.0Hook support on the CLI surface.
Windsurf3.5.17Ships a hook layer that is off by default.

✨ What the Windsurf admin surface cannot tell you

An IDE admin surface shows licensed accounts. It does not show an install under a personal account on a work laptop, whether the hook layer was ever enabled on that machine, or which MCP servers were added to it. For Windsurf the middle one is the question that matters, and it is the one no console answers.

Strac Shadow AI discovery showing Windsurf and other agents across the fleet
Windsurf alongside the other coding agents on the fleet, with the devices, users and MCP servers attached to each.

✨ The MCP side

Windsurf can call MCP servers, which means its reach is whatever is in the config rather than just the repository. A server pointed at production is a production credential sitting on a laptop, and a file-path control never sees it.

Strac MCP server inventory with approve and disallow controls
Every MCP server the fleet's agents can call, approved or disallowed, with the agents using each one.

Where Windsurf keeps its configuration

Windsurf reads MCP server definitions from ~/.codeium/windsurf/mcp_config.json. That file is the practical centre of a Windsurf security review, because it is the complete list of external systems the agent can reach, and it is the place credentials end up when someone wires a server to a real database.

Read it on a sample of machines before designing any policy. The contents tend to settle the argument about how much reach the agent actually has faster than any discussion will.

A worked example

A team rolls a credential blocklist across the fleet. They test it in Claude Code, where it blocks immediately, and in Cursor, where it also blocks. They declare the rollout complete.

On the Windsurf machines nothing is enforced, because the hook layer was never switched on. The configuration is present and correct, the tests passed on the agents that were checked, and the gap is invisible until someone tests Windsurf specifically. Default-off means a successful test elsewhere is not evidence here.

Three mistakes teams make with Windsurf

Assuming parity after testing another agent. This is the big one. Hooks being configured is not the same as hooks being active when the feature ships disabled.

Reviewing the settings file instead of the behaviour. A correct config on a machine with the layer off enforces nothing. Test the behaviour on a real machine.

Skipping the MCP config. mcp_config.json is where the reach actually lives, and it is the fastest read in the whole review.

✨ What you can actually evidence

For Windsurf the first thing worth evidencing is not what was blocked but whether the control was switched on at all, per machine. That is a question a config file cannot answer and a central agent can.

Strac findings broken down by secrets, PII, card data, health data and source code
Findings typed by data class rather than arriving as undifferentiated alerts, which is the difference between a log and an answer.

Rolling it out

ModeThe developer seesPromote when
MonitorNothing. The event is recorded.You are still learning what normal looks like.
AskA prompt, with the option to proceed.The rule is usually right but edge cases exist.
BlockThe call is stopped and the agent told why.The rule is unambiguous. Credentials belong here.

Related reading: AI coding agent security, Claude Code hooks, stop agents reading secrets, Cursor security, Codex security, GitHub Copilot CLI security.

To answer "was the hook layer actually switched on, per machine", Strac's coding agent security integration reports control state centrally rather than leaving it to a config file.

🌶️ Spicy FAQs

Is Windsurf secure by default?

Its hook layer is off by default, so the enforcement checkpoint other agents give you once configured is not active until someone enables it. That is the first thing to change. The rest of the posture is the same as any agentic IDE.

What is the first thing to do with Windsurf?

Enable the hook layer, then add a rule that blocks reads of credential files, then confirm on an actual machine that the rule fires. The confirmation step matters more here than elsewhere precisely because the default is off.

Can I use my existing hook script with Windsurf?

The deciding logic ports, since the shape of the checkpoint is the same across agents. The registration differs and the feature has to be switched on. Verify on your own build rather than assuming parity.

How do I know if Windsurf is installed on our machines?

Not from the licence list, which shows accounts rather than installs. Personal-account installs on work laptops are the common gap and need endpoint-side discovery.

Does Windsurf support MCP?

Yes, which means its reach is whatever servers are configured rather than just the open repository. Enumerate them and decide on each one; that list is usually longer than teams expect.

Last updated: November 24, 2026

Customer story

“Don’t just alert on problems, fix them.”

Scott Roberts, Chief Information Security Officer, UiPath

  • UiPath
  • Crypto.com
  • Inmar Intelligence
  • thredUP
  • Paymentology
  • Enveda
  • Genesis Molecular AI
  • MeridianLink
More customer stories →
Is Windsurf secure by default?
What is the first thing to do with Windsurf?
Can I use my existing hook script with Windsurf?
How do I know if Windsurf is installed on our machines?
Does Windsurf support MCP?
Discover & Protect Data on SaaS, AI, MCP, Endpoints & Cloud
Strac provides end-to-end data loss prevention for all SaaS and Cloud apps. Integrate in under 10 minutes and experience the benefits of live DLP scanning, live redaction, and a fortified SaaS environment.

Customers include

  • UiPath
  • Crypto.com
  • Inmar Intelligence
  • thredUP
  • Paymentology
  • Enveda
  • Genesis Molecular AI
  • MeridianLink
Trusted by enterprises
Data Security + Compliance Automation

Latest articles

Browse all

Get Your Datasheet

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close Icon