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 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.
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.

Windsurf supports this from version 3.5.17. The event names and the config file differ between agents; the decision point does not.
| Agent | Minimum version | Notes |
|---|---|---|
| Claude Code | 2.1.296 | The reference implementation. PreToolUse, PostToolUse, UserPromptSubmit and the rest. |
| Cursor | 1.7.0 | Reads Claude Code's hook format and maps it onto its own events. |
| Codex | 0.145.0 | Its own hook layer with equivalent before and after points. |
| GitHub Copilot CLI | 1.0.57 | Hook support on the CLI surface. |
| Gemini CLI | 0.27.0 | Hook support on the CLI surface. |
| Windsurf | 3.5.17 | Ships a hook layer that is off by default. |
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.

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.

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 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.
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.
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.

| Mode | The developer sees | Promote when |
|---|---|---|
| Monitor | Nothing. The event is recorded. | You are still learning what normal looks like. |
| Ask | A prompt, with the option to proceed. | The rule is usually right but edge cases exist. |
| Block | The 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.
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.
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.
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.
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.
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
.avif)
.avif)
.avif)
.avif)
.avif)

.gif)

