Skip to main content

Free trial

Install the plugin, then sign in or sign up for Semgrep, and Guardian checks the next file your agent writes. No credit card is required. The trial is 30 days.Claude Code and Codex are the recommended setups. Follow the Quickstart.
After 30 days, Guardian is $10 per seat per month for individuals and teams of any size. The bundle with Semgrep Code is $40 per seat per month. There is also an enterprise option.
Install the coding agent first. For the recommended setups, that is Claude Code (claude command) or the Codex CLI (codex command). You also need a Semgrep account. After you install the plugin, sign up if you don’t have one, or sign in if you do.Other coding agents are supported too. See Choose your setup.On Windows, Windows Subsystem for Linux (WSL) is required. Native Windows is unsupported.
No, if you use the Claude Code or Codex plugin. Both use Semgrep’s hosted scanner, and you sign in or sign up for Semgrep through the browser. Install the CLI only for other coding agents, or for the local Claude Code plugin. See Choose your setup.
In Claude Code, start a new session after installing the plugin. You’re prompted to sign in or sign up for Semgrep, and the plugin scans each file Claude Code writes. You can also run claude mcp get plugin:semgrep:guardian and confirm it reports as connected.In Codex, start a new session and sign in or sign up for Semgrep. Ask Codex who you are logged in as in Semgrep Guardian. You can also run codex plugin list --json and confirm the semgrep plugin is listed.When a scan finds something, Guardian returns the findings to the agent. See the Quickstart.
Review and trust Guardian’s hooks in Codex to enable scans after file writes.
Sign in or sign up once in the browser. New users create an account on that page. Semgrep refreshes access tokens after that.In Codex, ask the agent to log in to Semgrep Guardian. In Claude Code, start a new session and complete the prompt. See Authentication.

How Guardian works

Guardian scans files an AI coding agent writes, before that code is committed. It scans with Semgrep Code, Supply Chain, and Secrets to catch vulnerable code patterns, vulnerable dependencies, and hardcoded secrets. See the overview and Rules and configuration.
A hook, or an MCP tool call, scans what the agent just wrote or edited. The scan runs on the developer’s machine at authoring time, not in CI.
No. Guardian returns findings to the agent. The agent decides whether to regenerate the code. If it does, the new code is scanned again.
No. CI and platform scans still run on push, pull request, or a schedule, and they enforce your Policies. Keep running Semgrep in CI. See Set up and deploy scans.
No. Guardian scans code an agent generates before it is committed. The Semgrep Malware Firewall blocks malicious packages when developers install dependencies. After Guardian is installed, developers can run /install-mfw in the agent to install the Malware Firewall.
The Malware Firewall is in private beta. It requires a macOS or Linux terminal or shell.

Setup

Claude Code and Codex are the recommended setups. Other agents are supported too. See Choose your setup.
The paths differ in how you sign in or sign up for Semgrep, whether you need a local CLI, and which rules run. See Choose your setup.
Follow the Quickstart. For the local plugin, see Claude Code setup.
Follow the Quickstart.
Follow the page for your agent under Choose your setup.

Rules and findings

It depends on the setup. The recommended plugins don’t. See Rules and configuration.
See Rules and configuration for which rules that ruleset includes and why some are left out.
A CI scan can use rules the recommended plugins don’t run. See Rules and configuration.

Sign-in

Claude Code and Codex use a one-time browser sign-in or sign-up. Other agents use the CLI. See Authentication.
Where credentials are stored depends on how you signed in. See Authentication.
An existing sign-in can take precedence over another. See Authentication.
Shared tokens aren’t recommended. See Authentication. When a browser sign-in or sign-up isn’t possible, see Enterprise deployment.

Roll out to a team

Yes. Each developer still signs in or signs up for Semgrep after the plugin is installed. See Enterprise deployment.
Semgrep Enterprise has an option for that case. See Enterprise deployment.
Ask in Semgrep’s #mcp Slack community. For deployment questions, see Support.