> ## Documentation Index
> Fetch the complete documentation index at: https://docs.semgrep.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Semgrep Guardian FAQ

> Answers to common questions about Semgrep Guardian, including setup, rules, sign-in, team deployment, and the free trial.

## Free trial

> [accordion] How do I start the 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](https://docs.semgrep.dev/semgrep-guardian/quickstart.md).

> [accordion] How do I see how many days are left in my trial?
>
> Sign in to Semgrep AppSec Platform. A notice in the navigation bar shows how many days remain in your trial. The same notice also appears on the **[Settings > Billing](https://semgrep.dev/orgs/-/settings/billing)** page.

> [accordion] What happens after 30 days if I don't purchase a license?
>
> When the free trial ends and you haven't purchased a license, Guardian stops scanning AI-generated code.

> [accordion] What do I need installed first?
>
> 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](https://docs.semgrep.dev/semgrep-guardian/choose-your-setup.md).
>
> On Windows, [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install) is no longer required. Guardian works in native Windows shells such as PowerShell and Cygwin, as well as in WSL.

> [accordion] Do I need to install the Semgrep CLI for the trial?
>
> 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](https://docs.semgrep.dev/semgrep-guardian/choose-your-setup.md).

> [accordion] How do I know Guardian is running?
>
> 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](https://docs.semgrep.dev/semgrep-guardian/quickstart.md).

> [accordion] Why do I have to approve hooks in Codex?
>
> Review and trust Guardian's hooks in Codex to enable scans after file writes.

> [accordion] What if I'm not signed in?
>
> 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](https://docs.semgrep.dev/semgrep-guardian/authentication.md).

## How Guardian works

> [accordion] What does Semgrep Guardian do?
>
> 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](https://docs.semgrep.dev/semgrep-guardian/overview.md) and [Rules and configuration](https://docs.semgrep.dev/semgrep-guardian/rules-and-configuration.md).

> [accordion] When does a scan run?
>
> 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.

> [accordion] Does Guardian rewrite the code?
>
> No. Guardian returns findings to the agent. The agent decides whether to regenerate the code. If it does, the new code is scanned again.

> [accordion] Does Guardian replace scans in CI?
>
> 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](https://docs.semgrep.dev/deployment/checklist.md).

> [accordion] Is Guardian the same as the Malware Firewall?
>
> No. Guardian scans code an agent generates before it is committed. The [Semgrep Malware Firewall](https://docs.semgrep.dev/semgrep-supply-chain/malware-firewall.md) blocks malicious packages when developers install dependencies. After Guardian is installed, developers can run `/install-mfw` in the agent to install the Malware Firewall.
>
> > [!NOTE]
> >
> > The Malware Firewall is in private beta. It requires a macOS or Linux terminal or shell.

## Local PHP version check

> [accordion] Why did Guardian show a PHP version error?
>
> Guardian runs `php -v` to check your local PHP version. If that version is affected by actively exploited vulnerabilities with a public proof of concept, Guardian shows a message that names your version and the version to upgrade to. For example:
>
> ```
> Semgrep Guardian: The PHP installed on this machine (8.5.0) is affected by actively exploited vulnerabilities with a public proof of concept. Upgrade to PHP 8.5.12 or later.
> ```
>
> PHP 5.4 and later are affected. Upgrade to a fixed release for your PHP branch:
>
> | PHP branch | Upgrade to |
> | - | - |
> | 8.5 | 8.5.12 or later |
> | 8.4 | 8.4.27 or later |
> | 8.3 | 8.3.36 or later |
> | 8.2 | 8.2.35 or later |
> | 8.1 | TODO or later |
> | 8.0 | TODO or later |
> | 7.4 | TODO or later |
>
> PHP 5.4 through 7.3 have no fixed release. Upgrade to one of the branches in the table.
>
> For more information, see the [PHP security advisory](https://www.php.net/archive/2026.php#2026-10-21-5). For the other incidents Guardian checks for, see [Semgrep Guardian incident advisories](https://docs.semgrep.dev/semgrep-guardian/incident-advisories.md).

> [accordion] Which coding agents run the PHP version check?
>
> Claude Code and Codex.

> [accordion] How often does the PHP version check run?
>
> Once per coding session, on the first `Write`, `Edit`, `Bash`, `PowerShell`, or `apply_patch` call. If your PHP version is affected, Guardian blocks that call so you see the message. Later calls in the same session run normally. The check runs again when you start a new session, including in the same repository.

> [accordion] What if I don't have PHP installed?
>
> Guardian skips the check. No error is shown.

> [accordion] Can I turn off the PHP version check?
>
> Yes. Set the `SEMGREP_GUARDIAN_PHP_CHECK` environment variable to `off` in the environment where you start your coding agent, then start a new session:
>
> ```bash theme={null}
> export SEMGREP_GUARDIAN_PHP_CHECK=off
> ```
>
> Turn off the check only if you've mitigated the vulnerabilities another way, for example with custom patches on an end-of-life PHP install.

## Setup

> [accordion] Which coding agents does Guardian support?
>
> Claude Code and Codex are the recommended setups. Other agents are supported too. See [Choose your setup](https://docs.semgrep.dev/semgrep-guardian/choose-your-setup.md).

> [accordion] What's the difference between the two setup paths?
>
> 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](https://docs.semgrep.dev/semgrep-guardian/choose-your-setup.md).

> [accordion] How do I install Guardian in Claude Code?
>
> Follow the [Quickstart](https://docs.semgrep.dev/semgrep-guardian/quickstart.md). For the local plugin, see [Claude Code setup](https://docs.semgrep.dev/semgrep-guardian/ide-setup/claude-code.md).

> [accordion] How do I install Guardian in Codex?
>
> Follow the [Quickstart](https://docs.semgrep.dev/semgrep-guardian/quickstart.md).

> [accordion] How do I install Guardian in Cursor or another agent?
>
> Follow the page for your agent under [Choose your setup](https://docs.semgrep.dev/semgrep-guardian/choose-your-setup.md).

## Findings and rules

> [accordion] Does Guardian use my organization's Policies?
>
> It depends on the setup. The recommended plugins run the `guardian-default` ruleset plus any rules you add or turn off with [Guardian Policies](https://docs.semgrep.dev/semgrep-guardian/rules-and-configuration.md#customize-guardian-rules). Other integrations have no Guardian-specific policy available; they pull all rules enabled on Policies. See [Rules and configuration](https://docs.semgrep.dev/semgrep-guardian/rules-and-configuration.md).

> [accordion] Can I add my own rules to Guardian?
>
> Yes. Add rules for your whole organization on the **Policies** page, or add local developer rules in a `.semgrep/guardian-rules/` directory. See [Customize Guardian rules](https://docs.semgrep.dev/semgrep-guardian/rules-and-configuration.md#customize-guardian-rules).

> [accordion] What does the guardian-default ruleset include?
>
> See [Rules and configuration](https://docs.semgrep.dev/semgrep-guardian/rules-and-configuration.md) for which rules that ruleset includes and why some are left out.

> [accordion] How does Guardian scan for secrets?
>
> Guardian detects hardcoded secrets using Semgrep Code rules that look for secrets. It doesn't run the full [Semgrep Secrets](https://github.com/semgrep-secrets/conceptual-overview) product, so it doesn't validate secrets or run all Semgrep Secrets rules.
> Guardian doesn't replace Semgrep Secrets. Continue running Semgrep Secrets in CI to detect secrets that Guardian might miss. See [Set up and deploy scans](https://github.com/deployment/checklist).

> [accordion] Why did CI report an issue that Guardian missed?
>
> A CI scan can use rules the recommended plugins don't run. See [Rules and configuration](https://docs.semgrep.dev/semgrep-guardian/rules-and-configuration.md).

## Sign-in

> [accordion] How does sign-in work?
>
> Claude Code and Codex use a one-time browser sign-in or sign-up. Other agents use the CLI. See [Authentication](https://docs.semgrep.dev/semgrep-guardian/authentication.md).

> [accordion] Where are credentials stored?
>
> Where credentials are stored depends on how you signed in. See [Authentication](https://docs.semgrep.dev/semgrep-guardian/authentication.md).

> [accordion] Why are scans running under a different account?
>
> An existing sign-in can take precedence over another. See [Authentication](https://docs.semgrep.dev/semgrep-guardian/authentication.md).

> [accordion] Can the team share one API token?
>
> Shared tokens aren't recommended. See [Authentication](https://docs.semgrep.dev/semgrep-guardian/authentication.md). When a browser sign-in or sign-up isn't possible, see [Enterprise deployment](https://docs.semgrep.dev/semgrep-guardian/enterprise-deployment.md).

## Roll out to a team

> [accordion] Can I install Guardian for developers instead of asking each person to do it?
>
> Yes. Each developer still signs in or signs up for Semgrep after the plugin is installed. See [Enterprise deployment](https://docs.semgrep.dev/semgrep-guardian/enterprise-deployment.md).

> [accordion] What if developers can't sign in or sign up for Semgrep through a browser?
>
> Semgrep Enterprise has an option for that case. See [Enterprise deployment](https://docs.semgrep.dev/semgrep-guardian/enterprise-deployment.md).

> [accordion] Where do I get help?
>
> Ask in Semgrep's `#mcp` [Slack community](https://go.semgrep.dev/slack). For deployment questions, see [Support](https://docs.semgrep.dev/support.md).
