Semgrep Guardian vs xgrep vs Suricode: security checks for code your agent writes
Coding agents write more code than anyone can review by hand. Three tools now put a security check right next to the agent: Semgrep Guardian, Mondoo xgrep, and Suricode. They solve different parts of the problem. This page compares where each one runs, who reads the result, and who makes the fix.
No scores and no ranking. Pick the one that fits how you work.
The short version
- Semgrep Guardian scans each file the moment your agent writes it, on your machine, using Semgrep Code, Supply Chain, and Secrets. It suits teams already on the Semgrep platform who want to manage the rules themselves. (Semgrep docs)
- xgrep is a free, Semgrep-compatible scanner from Mondoo that ships as a single binary. Your agent calls it over MCP or the CLI to scan, trace code, and apply fixes it has verified. It suits developers who want a fast local tool and will run it themselves. (mondoo.com/xgrep)
- Suricode reads the whole repository after every push, and again on a schedule when nothing changed. It hands your agent a short list in plain words, with leaked keys first. When a package has no fixed version, it builds a patched copy of the one you already run. It suits people shipping apps built with AI who don't want to maintain rules or scanners. (suricode.ai)
Side by side
| Semgrep Guardian | Mondoo xgrep | Suricode | |
|---|---|---|---|
| What it is | A security layer for AI coding agents. It bundles the Semgrep MCP server, hooks, and skills into one install. [1] | A free, Semgrep-compatible scanner covering SAST, secrets, and SCA, built for AI agents. [5] | A security check for apps built with AI. It reads the code; your coding agent makes the change. [9] |
| When it checks | At authoring time: each file the agent writes or edits triggers a scan. It does not replace CI scans. [1] | Whenever you or your agent runs it (CLI or MCP), or in CI. [5][7] | After every push, and on a schedule when the code did not change. [9] |
| Where it runs | On the developer's machine. The Claude Code and Codex plugins use Semgrep's hosted server, and other agents use a local Semgrep CLI. [1][3] | Locally, as one binary. "No AI agent or hosted backend required." [5] | On Suricode's scanner. Each check fetches the project into a private working copy. [9] |
| What it scans | The files the agent just generated. [1] | The path you point it at (for example ./src), including git history for secrets. [5] |
The whole repository, including lockfiles, Dockerfiles, and configs. [9] |
| Coverage | Code (SAST), Supply Chain (dependencies), Secrets. Also checks the local PHP and Node.js runtime versions at session start. [1][4] | Tree-sitter AST matching with cross-file taint analysis, 270+ secret detectors across 150+ providers with live validation, SCA with reachability, and CycloneDX/SPDX SBOMs. [5] | Leaked secrets, vulnerable packages, risky code, and server setup (Dockerfiles, Kubernetes, Terraform, nginx, GitHub Actions). [9] |
| Who reads the result | The agent. Guardian returns findings, and the agent decides whether to regenerate the code. [1] | The agent, as JSON/MCP output with code context and remediation guidance. [7][8] | You and your agent. You get a short, ordered list in plain words, and the technical details go to the agent. [9] |
| Who fixes it | The agent regenerates the code. [1] | The agent. fix is the only command that writes, and it applies a fix only after a verify step clears the finding. [5][7] |
Your coding agent, in your editor. Suricode never writes to the repo. [9] |
| Rules | The guardian-default ruleset, customizable with Guardian Policies (up to 1,000 org rules) plus local developer rules in .semgrep/guardian-rules/ (50 per scan). Custom policies work only on the Claude Code and Codex plugins. [2] |
Built-in rules. Runs standard Semgrep/OpenGrep YAML rules unchanged. [5][6] | You don't write or maintain rules. Suricode works out your stack and runs the tools that fit. [9][10] |
| Package with no fixed version | Reports the finding. On the wider Semgrep platform, autofix can open lockfile-only PRs for transitive npm and PyPI dependencies when a fix exists. [4] | Reports the finding with remediation guidance. [5] | Builds a patched copy of the version you already run, so you don't jump a major release. [11] |
| Agents | Claude Code and Codex (recommended plugins), plus Cursor, GitHub Copilot, VS Code, Devin, Kiro, and other MCP clients through the local CLI. [3] | Any MCP-capable agent. Mondoo lists Codex, Gemini CLI, GitHub Copilot, Windsurf, Goose, Cline, Kiro, Roo, Trae, and Kilo Code, and offers Claude Code skills and guard hooks. [5][7] | Cursor, Claude Code, Codex, OpenCode. You paste one prompt, once. [9] |
| Repositories | Works on the developer's machine, wherever the code lives. [1] | Any local checkout. The paid Mondoo platform connects GitHub, GitLab, and Azure DevOps. [5] | GitHub (read-only app), Bitbucket, Origin (read-only Origin App), or any git address with a token or SSH key. [9] |
| Setup | Install a plugin and sign in through the browser (Claude Code/Codex), or install the Semgrep CLI (other agents). [3] | npx @mondoohq/xgrep scan ./src, or install it globally with npm. Prebuilt binaries for Linux and Windows. [5][12] |
Sign in with your email (no password), then connect a repository. Nothing to install. [9] |
| Price | Free for 30 days. When the trial ends without a purchased license, Guardian stops scanning. Semgrep's pricing page lists no separate Guardian price (Teams plans start at $30 per contributor per month). [4][15][16] | Free. The license is proprietary (not open source). [5][13] | Free. Adding a project and getting a check costs nothing. [10] |
Semgrep Guardian
Guardian runs while your agent writes code. When the agent creates or edits a file, a hook or MCP call scans what it just generated with Semgrep Code, Supply Chain, and Secrets. If there are findings, the agent gets them back and decides whether to regenerate. [1] Since October 2026, Guardian scans in the background without blocking the agent, and it wakes the agent up if it has already stopped. [4]
Rules are Guardian's strength. Teams can choose which Semgrep rules Guardian runs, separately from their CI scans, and developers can add their own rules for a repository. [2] There is a catch: that separate policy works only on the recommended Claude Code and Codex plugins. Other agents pull every rule enabled in the organization's Policies. [2][3]
Semgrep says Guardian complements CI scans rather than replacing them. [1] Semgrep was also named a Strong Performer in The Forrester Wave™: Agentic Development Security Tools, Q4 2026. [14]
Good fit if: you already use the Semgrep platform, you have someone who manages rules, and you want checks at the moment code is written.
Mondoo xgrep
xgrep is a free scanner from Mondoo. It combines SAST, secret detection, and dependency analysis in one binary with no interpreter to boot. [5] It reads the Semgrep rule format and mirrors the Semgrep/OpenGrep CLI, so existing Semgrep YAML rules run unchanged. [6]
For agents, xgrep exposes scanning, a code graph (callers, callees, call paths), code navigation, and fix tools over MCP. All of these tools are read-only except the two fix-apply tools, which write only a fix that has passed verification. [7][8] Mondoo is explicit that "xgrep does not embed an LLM. It gives your agent skills and tools." [5]
xgrep is free, but it isn't open source: the npm package is under a proprietary Mondoo license. [13]
Good fit if: you want a fast local scanner that your agent drives itself, you're comfortable reading or triaging findings with the agent, and you may already have Semgrep rules you want to reuse.
Suricode
Suricode doesn't run inside the agent's session. After every push, it reads the whole repository on its own scanner, including the lockfiles, Dockerfiles, and configs an agent tends to skip. It also checks on a schedule when nothing changed, because a library can pick up a new hole in code you never touched. [9]
The result is a short list in plain words: what to fix, why it matters, and how urgent it is. Leaked keys come first. You paste one prompt into Cursor, Claude Code, Codex, or OpenCode, once, and from then on the agent works through the list instead of searching the project. Its tokens go to the change, not to the hunt. [9]
Suricode only ever gets read access. Your agent makes every change, in your editor, where you can see it. [9]
When a package has a known hole and no fixed release exists in that major version, Suricode builds a patched copy of the version you already run. You keep the same package and the same API, and you skip the forced upgrade. [11]
Suricode is free, and you sign in with your email. [10]
Good fit if: you ship apps an AI agent helped write, you don't want to maintain rules or run scanners, and you want the whole repo checked on every push, including packages that have no upstream fix.
Can you use them together?
Yes. They check at different moments. Guardian or xgrep catches problems while the agent is writing. Suricode checks the whole repository after the push, and again when nothing changed. A setup that runs one check at write time and another after the push covers both gaps.
The first Suricode check is free
Connect a GitHub, Bitbucket, or Origin project, or paste a git address. Sign in with your email. No password, nothing to install.
Start free → · See also: Semgrep alternative · Patched packages
Sources (checked 2026-11-09)
- Semgrep Guardian overview: https://docs.semgrep.dev/semgrep-guardian/overview
- Guardian rules and configuration: https://docs.semgrep.dev/semgrep-guardian/rules-and-configuration
- Choose your Guardian setup: https://docs.semgrep.dev/semgrep-guardian/choose-your-setup (and Codex setup: https://docs.semgrep.dev/semgrep-guardian/ide-setup/codex)
- Semgrep, "What Shipped in October 2026" (Nov 3, 2026): https://semgrep.dev/blog/2026/what-shipped-october-2026/
- Mondoo xgrep product page: https://mondoo.com/xgrep
- xgrep Semgrep/OpenGrep compatibility: https://mondoo.com/docs/xgrep/code-scanning/semgrep-compatibility
- xgrep AI agents docs: https://mondoo.com/docs/xgrep/ai-agents and MCP server: https://mondoo.com/docs/xgrep/integrations/mcp-server
- xgrep AI & code graph: https://mondoo.com/xgrep/ai
- Suricode homepage: https://suricode.ai/
- Suricode pricing: https://suricode.ai/pricing (rules/stack: homepage FAQ)
- Suricode patched packages: https://suricode.ai/patched-packages
- xgrep installation: https://mondoo.com/docs/xgrep/getting-started/installation
- npm package license (LicenseRef-Mondoo-Proprietary): https://www.jsdelivr.com/package/npm/@mondoohq/xgrep
- Semgrep blog on the Forrester Wave Q4 2026: https://semgrep.dev/blog/2026/semgrep-recognized-in-the-forrester-wave-agentic-development-security-tools-q4-2026/ (Endor Labs named Leader: https://www.prnewswire.com/news-releases/endor-labs-named-a-leader-in-agentic-development-security-tools-evaluation-by-independent-research-firm-302929506.html)
- Semgrep pricing: https://semgrep.dev/pricing
- Semgrep Guardian FAQ (free trial and license): https://docs.semgrep.dev/semgrep-guardian/faq