WINDSURF SECURITY CHECKLIST

Windsurf’s strength — Cascade running autonomously across your repo — is the same thing that makes its output dangerous. A single prompt can refactor twelve files, three of which contain auth code or migrations, and the diff is large enough that reviewers scan it instead of reading it. The checklist below is what we look for first when we audit a repo with active Windsurf use.

Treat Critical as launch-blocking. High is week-one. Medium is the cleanup once Windsurf is part of your team’s flow.

How to use this checklist

Walk it once on a representative branch, then make the relevant items part of your PR template. The Cascade-specific items don’t show up in normal code review because reviewers focus on the intentional diff — the dangerous changes are the ones the author didn’t realize they made.

Critical (fix before launch)

1. Review every Cascade-generated migration before applying

Why it matters. Cascade will rewrite database migrations to “be more efficient” or “match the new schema”. We have audited cases where a migration silently dropped a unique constraint, removed a not null, or replaced a text column with varchar(50) (truncating production data on the next write).

How to check. For every PR that touches migrations/, prisma/schema.prisma, db/schema.sql, or alembic/versions/, diff line-by-line against main. Confirm no constraints, indexes, or default values were removed without explicit intent.

How to fix. Require human approval on migration PRs via CODEOWNERS. Run migrations against a staging snapshot before production. Reject Cascade’s “I optimized this” commits unless you can explain what was optimized.

2. Audit @-mentioned context files for secrets

Why it matters. Windsurf sends @-mentioned files to the model on every prompt. Developers @-mention .env, config files, or test fixtures “just to give context”, and those values end up in provider transcripts. Cascade then often pastes excerpts of those files into the diff or the chat panel, where they may be retained.

How to check. Review your recent Windsurf chat history for @.env, @config/secrets, @.aws/credentials, @~/.npmrc. Any match means the secrets in those files are now in transcripts.

How to fix. Move secrets out of files that get @-mentioned. Use placeholders in config files for values that shouldn’t be in any prompt. Rotate anything that ever entered chat context.

3. Verify .windsurfrules does not override security hooks

Why it matters. .windsurfrules and .codeiumignore shape what Cascade reads and what it skips. A malicious or careless rule (Always commit without running pre-commit hooks) can disable your team’s secret-scanning, lint, and security-test gates.

How to check. Read .windsurfrules and .codeiumignore in full. Look for instructions that bypass commits hooks, that disable verification steps, or that whitelist patterns your secret scanner is supposed to catch.

How to fix. Move security gates to CI (where rules files can’t disable them). Keep .windsurfrules to coding-style preferences only.

4. Check generated auth code for missing CSRF tokens

Why it matters. Cascade-generated form handlers in Express, Flask, and Rails apps frequently skip CSRF token verification. The form looks complete, the happy-path test passes, and there’s no visible regression — until someone forges a state-changing request from another origin.

How to check. For every state-changing route (POST, PUT, DELETE), confirm the framework’s CSRF middleware is mounted and the handler actually verifies the token. Test by submitting a request with no token from a different origin.

How to fix. Add CSRF middleware at the app level, not the route level (so new routes inherit it). Add a CI test that confirms a sample form rejects requests without the token.

5. Strip API keys from paths bypassed by .codeiumignore

Why it matters. .codeiumignore only stops Codeium’s indexer; the agent can still read those files via the file system if it has Bash access. Developers assume “the AI can’t see this” and paste secrets in. Then the agent reads them anyway, then commits them anyway.

How to check. Diff the contents of .codeiumignore against your real secret locations (.env, .aws/, .npmrc, ~/.config/gh/). If secrets are kept in those paths, audit recent diffs for accidental commits.

How to fix. Move secrets out of the working tree entirely. Use environment variables, secret managers, or OS-level credential storage. Don’t rely on ignore files to hide credentials from the agent.

6. Confirm Cascade did not silently weaken existing security middleware

Why it matters. Same failure mode as Cursor: “make this endpoint faster” deletes a CSRF check, “support JSON bodies” skips the rate limiter, “fix this test” relaxes the assertion. The dangerous changes are not in the file you intentionally edited.

How to check. On every Cascade PR, diff the security-sensitive files against main: middleware, auth utilities, CORS, CSP, JWT verification, RLS policies. Any deletion or relaxation is suspect.

How to fix. Require CODEOWNERS approval on security-sensitive paths. Add CI lints that fail when specific lines (csrf(), requireAuth(, verifyJwt() are removed.

High (fix in the first week)

7. Require PR review on Cascade autonomous edits

If your team uses Cascade with auto-commit on, treat those commits as “code an LLM wrote with a glance from a human.” Require a second human reviewer on every Cascade-authored PR, especially anything touching authn/authz, payments, or PII.

8. Pin dependency versions after Cascade adds packages

Cascade will install new packages to solve small problems. Pin every dependency in package.json / requirements.txt and audit with npm audit / pip-audit after every session.

9. Disable telemetry on repos with PII

Windsurf sends prompts and file context to its servers (and to model providers). For repos with customer data or unreleased IP, switch the workspace to “Privacy Mode” / “Zero Data Retention” and confirm the indicator shows it.

10. Pin the Cascade model in production-adjacent repos

Different models have different failure modes. Pin a specific model in workspace settings so reviewers know what generated the diff.

11. Audit any new MCP servers Cascade enabled

If your Windsurf setup uses MCP, every new MCP server is new tool surface. Audit tool descriptions for prompt-injection risk before installing.

12. Verify Cascade did not commit anything you didn’t approve

Auto-commit mode can push to remote without you seeing the final diff. Branch protection on main is non-negotiable. Restrict push permissions on production branches to a CI service account, not the IDE.

Medium (fix when you can)

13. Document directories Cascade is allowed to write to

Add a .windsurfrules that explicitly forbids Cascade from touching infra/, migrations/, .github/workflows/, and auth/ without confirmation.

14. Add a pre-commit hook that fails on staged secrets

pre-commit with detect-secrets or gitleaks catches keys Cascade pasted into config files or test fixtures before they reach the remote.

15. Re-run security tests after every Cascade refactor

Cascade sometimes “fixes” a failing security test by relaxing the assertion. Re-run security-specific tests separately and read the diff if any started passing where they were failing.

16. Audit .windsurf/ for accumulated chat history

Long sessions accumulate paste-bin worth of code, including secrets and customer data. Periodically clear local chat history.

17. Lock down CODEOWNERS on security paths

CODEOWNERS pointing infra and security directories at a human team forces a human approval on Cascade-authored changes there.

18. Add CI gates that flag dangerous patterns

CI rules that fail on eval(, exec(, dangerouslySetInnerHTML, cors(), and os.system( catch Cascade regressions that pass review because nobody noticed the new line.

After every Cascade session

  • git diff the entire branch — Cascade edits adjacent files when it thinks they’re related.
  • Search the diff for csrf, requireAuth, cors(, verifyJwt, sanitize. Any deletion is suspect.
  • Re-run the test suite, then re-run security tests separately.
  • Audit package.json / requirements.txt / go.mod for new dependencies.
  • Check .windsurfrules and .codeiumignore for newly added entries.

Common attack patterns we see in Windsurf projects

The migration that drops a constraint. “Make this migration faster” prompt removes a unique constraint that was blocking a query plan. Production immediately starts accepting duplicate emails.

The CSRF middleware that vanished. “Add JSON support” prompt rewrites the form handler. New handler accepts JSON, doesn’t verify CSRF, doesn’t check the auth cookie. Form-only attack surface is now JSON-and-form, both unverified.

The leaked rules file. Developer pastes API key into .windsurfrules “as a working example”. Repo is public; key is in chat transcripts and in git history.

The auto-commit at 4pm Friday. Cascade auto-commits and pushes a partially completed refactor. CI passes because the failing tests were also “fixed” by Cascade. Production goes down at 4:15.

How to Secure Windsurf

Step-by-step guide for hardening a Windsurf workflow — workspace settings, rules files, CODEOWNERS patterns, and CI gates that catch the most common Cascade regressions.

Is Windsurf Safe?

In-depth analysis of the editor’s privacy and security model — what data leaves your machine, where it goes, and what the practical Cascade failure modes look like.

Automate Your Checklist

A checklist tells you what to look for. A scanner tells you what’s actually broken in the deployed app right now. VibeEval drives a real browser through the deployed result of your Windsurf work, attempts the missing-CSRF and missing-auth attacks above, and reports what got through — with file and line numbers to fix.

SCAN A WINDSURF PROJECT

14-day trial. No card. Results in under 60 seconds.

START FREE SCAN