Prerequisites
- A Semgrep account
- Claude Code installed (
claudecommand)
Setup (remote plugin)
Install the Guardian plugin from the Claude Marketplace:claude) to sign in to Semgrep.
The plugin registers a post-tool hook so Claude Code scans every file it writes.
For Windows machines: Windows Subsystem for Linux (WSL) is no longer required. Guardian works in native Windows shells such as PowerShell and Cygwin, as well as in WSL.
Run Semgrep Guardian locally
The remote server is the recommended default. If you need to run Semgrep locally instead, you can install the local plugin from thesemgrep/guardian-local repo.
2
Start a Claude Code instance:
3
Open the plugin manager:
4
Go to Discover. Search for Semgrep, and then click Install.
5
Load the plugin:
What rules does this setup use?
- Remote plugin (default): scans with the
guardian-defaultruleset, which you can customize with Guardian Policies. You configure Guardian’s rules separately from your CI and platform scans. - Local plugin: no Guardian-specific policy available. Pulls all rules enabled on Policies.
Local PHP version check
Guardian checks the PHP version installed on your machine. See Why did Guardian show a PHP version error? for when the check runs, which versions are affected, and how to turn it off. For the full list of incidents Guardian checks for, including Node2Shell, see Semgrep Guardian incident advisories.Next steps
- Enterprise deployment for OAuth credentials and organization-wide deployment
- Semgrep Guardian overview
- Rules and configuration