$git clone https://github.com/snyk/agent-scan> Note: CLI output is experimental and subject to change > > The raw output of this CLI — including issue codes, field names, severity labels, and response structure — is experimental and may change without notice between releases. We do not recommend building production work
| 1 | <p align="center"> |
| 2 | <h1 align="center"> |
| 3 | Snyk Agent Scan |
| 4 | </h1> |
| 5 | </p> |
| 6 | |
| 7 | <p align="center"> |
| 8 | Discover and scan agent components on your machine for prompt injections<br/> |
| 9 | and vulnerabilities (including agents, MCP servers, skills). |
| 10 | </p> |
| 11 | |
| 12 | > **Note: CLI output is experimental and subject to change** |
| 13 | > |
| 14 | > The raw output of this CLI — including issue codes, field names, severity labels, and response structure — is experimental and may change without notice between releases. We do not recommend building production workflows that depend on specific CLI output fields or issue codes. |
| 15 | > |
| 16 | > If you are an enterprise customer using Snyk to manage agent security risk at scale, the CLI output may not reflect what is sent to and shown in the Evo platform. The underlying integration, discovery, and risk assessment that powers enterprise deployments is stable and supported — any changes will be communicated in line with standard Snyk product practices. Contact your account team for deployment guidance. |
| 17 | |
| 18 | > **NEW** Read our [technical report on the emerging threats of the agent skill eco-system](.github/reports/skills-report.pdf) published together with Agent Scan 0.4, which adds support for scanning agent skills. |
| 19 | |
| 20 | <p align="center"> |
| 21 | <a href="https://pypi.python.org/pypi/snyk-agent-scan"><img src="https://img.shields.io/pypi/v/snyk-agent-scan.svg" alt="snyk-agent-scan"/></a> |
| 22 | <a href="https://pypi.python.org/pypi/snyk-agent-scan"><img src="https://img.shields.io/pypi/l/snyk-agent-scan.svg" alt="snyk-agent-scan license"/></a> |
| 23 | <a href="https://pypi.python.org/pypi/snyk-agent-scan"><img src="https://img.shields.io/pypi/pyversions/snyk-agent-scan.svg" alt="snyk-agent-scan python version requirements"/></a> |
| 24 | </p> |
| 25 | |
| 26 | <div align="center"> |
| 27 | <img width="1304" height="976" alt="agent-scan-pretty" src="https://github.com/user-attachments/assets/49c32115-703c-465f-bb09-1b6bae852253" /> |
| 28 | </div> |
| 29 | |
| 30 | <br> |
| 31 | |
| 32 | Agent Scan helps you keep an inventory of all your installed agent components (harnesses, MCP servers, and skills) and scans them for common threats like prompt injections, sensitive data handling, or malware payloads hidden in natural language. Ignore analysis on skills by using `--no-skills`. |
| 33 | |
| 34 | ## Security Warning |
| 35 | |
| 36 | > **⚠️ IMPORTANT: Scanning MCP configurations will execute the commands defined in them.** |
| 37 | > |
| 38 | > When Agent Scan scans an MCP configuration file, it starts the stdio MCP servers by executing the commands and arguments specified in the config. This is necessary to retrieve tool descriptions and perform security analysis. |
| 39 | > |
| 40 | > **Recommendations:** |
| 41 | > - **Run scans inside a sandbox** (Docker container, VM, or disposable environment) when evaluating untrusted or third-party MCP configs |
| 42 | > - **Review the consent prompt carefully** during interactive scans, it shows the exact command and arguments that will be executed for each server |
| 43 | > - **Use `--dangerously-run-mcp-servers`** only in trusted environments where you've verified all MCP server commands |
| 44 | > |
| 45 | > By default, Agent Scan requires explicit user consent (y/n) before starting each stdio MCP server during interactive runs. This gives you control over what gets executed on your system. |
| 46 | |
| 47 | ## Quick Start |
| 48 | |
| 49 | Choose one of two ways to run Agent Scan: |
| 50 | |
| 51 | 1. **Run the Python package with `uvx`** using the instructions below. |
| 52 | 2. **Download a standalone binary** for your platform from [GitHub Releases](https://github.com/snyk/agent-scan/releases). Releases also include the SBOM, checksums, signed checksums, and source code archives. |
| 53 | |
| 54 | Before using either option: |
| 55 | |
| 56 | 1. **Sign up at [Snyk](https://snyk.io)** and get an API token from [https://app.snyk.io/account](https://app.snyk.io/account) (API Token → KEY → click to show). |
| 57 | 2. **Set the token as an environment variable** before running any scan: |
| 58 | ```bash |
| 59 | export SNYK_TOKEN=your-api-token-here |
| 60 | ``` |
| 61 | |
| 62 | ### Run with `uvx` |
| 63 | |
| 64 | Have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed on your system, then run a full scan of your machine (auto-discovers age |