How Guardian works
Guardian runs at authoring time, on the developer’s machine, rather than in CI:- Your coding agent writes or edits a file.
- A hook (or an MCP tool call, depending on the integration) triggers a Semgrep scan of what the agent just generated.
- If Semgrep returns findings, the agent receives them and is prompted to regenerate the code.
- The loop repeats until the scan is clean or you dismiss the findings.
Two setup paths
Guardian has two materially different integration paths. Which one you use changes how you authenticate, whether you need a local Semgrep CLI, and which rules Guardian scans with:- Claude Code with the remote plugin (recommended). Uses Semgrep’s hosted remote server and authenticates through OAuth. No local Semgrep CLI required.
- All other agents, and the local Claude Code plugin. Runs Semgrep through a locally installed CLI.
Next steps
Quickstart
Set up Guardian with Claude Code in a few minutes.
Choose your setup
Compare the remote and local CLI paths before you install.
Rules and configuration
Which rules Guardian scans with, and when that differs.
Deploy across your organization
Roll Guardian out to a fleet with marketplace controls or MDM.
Additional resources
- Semgrep’s
#mcpSlack community - The Semgrep MCP server repo on GitHub