Snyk Agent Scan 标志

Snyk Agent Scan

组织热门
snyk

Security scanner for AI agents, MCP servers and agent skills.

发布者snyk
代码仓库agent-scan
语言Python
复刻数
278
星标数
3.1K
可用工具
0
传输类型stdio
分类
许可协议Apache-2.0
链接
  • 将工具接入 AI 工作流

    Snyk Agent Scan 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 3.1K 个星标和 278 个复刻。

Note: We don't publish an npm package for Agent Scan. Install it via uvx or as a standalone binary.

Note: CLI output is experimental and subject to change

Agent Scan v0.5.x (planned for deprecation)

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.

Agent Scan v0.6 and later

The raw output of this CLI — including risk indicator names, scores, field names, 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 risk names.

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.

NEW Read our technical report on the emerging threats of the agent skill eco-system published together with Agent Scan 0.4, which adds support for scanning agent skills.

Agent Scan v0.5.x output

[!WARNING] Agent Scan v0.5.x uses issue-code output. This CLI line is planned for deprecation.

Agent Scan v0.6 and later output

Agent Scan helps you discover 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.

Security Warning

⚠️ IMPORTANT: Scanning MCP configurations can execute commands or make outbound network requests.

To retrieve tool descriptions, Agent Scan starts stdio MCP servers by executing the commands in the config and connects to configured remote MCP server URLs with their configured headers.

Recommendations:

  • Run scans inside a sandbox (Docker container, VM, or disposable environment) when evaluating untrusted or third-party MCP configs
  • Review the consent prompt carefully during interactive scans; it shows the command or remote URL for each server
  • Use --dangerously-run-mcp-servers only in trusted environments where you've verified all MCP server commands and remote URLs

Remote MCP requests refuse destinations resolving to link-local addresses or known cloud-metadata endpoints (169.254.0.0/16, fe80::/10, fd00:ec2::254, and 100.100.100.200). Loopback and private addresses remain allowed for local and internal MCP servers. HTTP redirects are not followed. DNS is validated before each request, but resolution again at connection time leaves a DNS-rebinding window.

By default, Agent Scan requires explicit user consent (y/n) before contacting each discovered MCP server during foreground interactive runs. Background and push-key scans continue to inspect remote servers automatically for fleet coverage, but do not start stdio servers unless --dangerously-run-mcp-servers is set.

Quick Start

Choose one of two ways to run Agent Scan:

  1. Run the Python package with uvx using the instructions below.
  2. Download a standalone binary for your platform from GitHub Releases. Releases also include the SBOM, checksums, signed checksums, and source code archives.

Before using either option:

  1. Sign up at Snyk and get an API token from https://app.snyk.io/account (API Token → KEY → click to show).
  2. Set the token as an environment variable before running any scan:
    bash
    export SNYK_TOKEN=your-api-token-here

Run with uvx

Have uv installed on your system. Choose the instructions for your CLI version.

Agent Scan v0.5.x

The examples pin v0.5.17 as a concrete v0.5.x release:

bash
# Scan the whole machine
uvx snyk-agent-scan@0.5.17

# Scan a specific MCP configuration
uvx snyk-agent-scan@0.5.17 ~/.vscode/mcp.json

# Scan a single agent skill
uvx snyk-agent-scan@0.5.17 ~/path/to/my/SKILL.md

# Scan all Claude skills
uvx snyk-agent-scan@0.5.17 ~/.claude/skills

[!WARNING] v0.5.x uses issue-code output and the 2025-09-02 analysis API. This CLI line is planned for deprecation.

Agent Scan v0.6 and later

bash
# Scan the whole machine
uvx snyk-agent-scan@latest

# Scan a specific MCP configuration
uvx snyk-agent-scan@latest ~/.vscode/mcp.json

# Scan a single agent skill
uvx snyk-agent-scan@latest ~/path/to/my/SKILL.md

# Scan all Claude skills
uvx snyk-agent-scan@latest ~/.claude/skills

v0.6 and later use the risk-based output and the 2026-07-10 analysis API.

Both versions scan MCP servers, tools, prompts, resources, and skills, and automatically discover supported agent configurations such as Claude Code/Desktop, Cursor, Gemini CLI, and Windsurf.

Run with a standalone binary

Download the binary for your operating system and architecture from the latest GitHub Release. The release page also provides an SBOM (sbom-<version>.json), checksum files, and GitHub-generated source code archives. See Verifying Standalone Binaries to verify your download.

Highlights

  • Auto-discover MCP configurations, agent tools, skills
  • Scanning of Claude, Cursor, GitHub Copilot, Windsurf, Gemini CLI, Amp, Amazon Q, and other agents.

Agent Scan v0.5.x

Agent Scan v0.6 and later

Supported agents and capabilities

Agent Scan auto-discovers agents and their capabilities (MCP servers or skills) when their install paths exist. The table below shows on which operating systems each agent is scanned.

  • ✓: at least one path is defined for that capability.
  • ✗: the agent is listed for that OS but has no paths for that capability.
  • —: that agent is not included for that OS.
  • Skills Skills can be ignored by using --no-skills
AgentmacOS MCPmacOS SkillsLinux MCPLinux SkillsWindows MCPWindows Skills
Windsurf✓✓✓✓✓✓
Cursor✓✓✓✓✓✓
VS Code✓✓✓✓✓✓
GitHub Copilot✓✓✓✓✓✓
Claude Desktop✓✗——✓✗
Claude Code✓✓✓✓✓✓
Gemini CLI✓✓✓✓✓✓
OpenClaw✗✓✗✓✗✓
Amp✗✓✗✓✗✓
Kiro✓✓✓✓✓✓
OpenCode✓✓✓✓✓✓
Antigravity✓✓✓✓✓✓
Codex✓✓✓✓——
Amazon Q✓✗✓✗✓ (WSL)✗

Detection coverage by scope

The matrix above shows on which operating systems each agent is scanned. This one breaks detection down by configuration scope and component type (skills vs MCP servers), combined across operating systems. "Servers" means MCP servers.

The four scopes:

  • System — machine-wide / admin-managed / enterprise config that applies to all users (e.g. managed-mcp.json, files under /etc, /Library/Application Support, or ProgramData).
  • User — the user's home-directory config (applies across all their projects).
  • Project / workspace — config scoped to an opened project or workspace.
  • Extension / plugin — components bundled inside installed extensions or plugins.

Legend: ✓ detected · ✗ the agent supports this but Agent Scan does not scan it yet · N/A the agent has no such component at this scope.

AgentSystemskillsSystemserversUserskillsUserserversProject / WSskillsProject / WSserversExt / pluginskillsExt / pluginservers
Windsurf✓N/A✓✓✓✓✓✓
CursorN/AN/A✓✓✓✓✓✓
VS CodeN/AN/A✓✓✓✓✓✓
GitHub Copilot §N/AN/A✓✓✓✓✓✓
Claude DesktopN/AN/A✗✓N/AN/AN/A✗
Claude Code✗✓✓✓✓✓✓✓
Gemini CLIN/A✗✓✓✗✗✗✗
OpenClawN/AN/A✓✗✓ †N/A✗✗
AmpN/A✗✓✗✗ ‡✗✗✗
KiroN/AN/A✓✓✓✓✓✓
OpenCode✓✓✓✓✓✓N/AN/A
AntigravityN/AN/A✓✓✓✓✓✓
Codex✓✓✓✓✓✓✓✓
Amazon QN/AN/AN/A✓N/A✗N/AN/A

† OpenClaw has no opened-project enumeration: its project/workspace skills are found only at the fixed ~/.openclaw/workspace/skills

‡ Amp stores project/workspace skills at .agents/skills (and the .claude/skills compatibility path); only the user-scope ~/.config/agents/skills is detected today, so project-scope skills are supported but not yet scanned.

§ GitHub Copilot covers the CLI and the desktop app, which share the ~/.copilot home with Copilot in VS Code, and is detected from that home rather than from a VS Code install. COPILOT_HOME relocations are honored when scanning your own home. Project scope covers the repo-relative .mcp.json / .github/mcp.json files and the .github/skills, .claude/skills and .agents/skills directories, for the folders passed to the scan and the directories Copilot has recorded in permissions-config.json, plus their ancestors. Plugin scope covers ~/.copilot/installed-plugins, including plugin.json manifests that relocate their MCP config or declare extra skills roots. Not scanned: the per-session project roots in session-state/*/workspace.yaml. Copilot's user-level paths are also listed under VS Code, which reads the same files.

Verifying Standalone Binaries

We use GPG signing on the release checksums file to ensure distribution integrity and authenticity.

Step-by-Step Verification Guide

  1. Download the release assets: Download the binary for your platform (e.g., agent-scan-<version>-<os>-<arch>) and the signed checksums file (sha256sums.txt.asc) from the GitHub Releases page into the same directory.

  2. Verify GPG signature of the checksums file: Download the GPG public key into the same directory, then run:

    bash
    gpg --import snyk-code-signing-public.pgp
    gpg --verify sha256sums.txt.asc

    Look for a line in the output saying gpg: Good signature from "Snyk Limited <code-signing@snyk.io>".

  3. Verify the binary's integrity: After confirming the signature is valid, check that your downloaded binary matches the checksum:

    • On Linux (or macOS with coreutils):
      bash
      grep agent-scan-<version>-<os>-<arch> sha256sums.txt.asc | sha256sum -c -
    • On macOS (using default shasum):
      bash
      grep agent-scan-<version>-<os>-<arch> sha256sums.txt.asc | shasum -a 256 -c -

    This will output agent-scan-<version>-<os>-<arch>: OK.

Scanner Capabilities

Agent Scan v0.5.x

Agent Scan is a security scanning tool to both scan and inspect the supply chain of agent components on your machine. It scans for common security vulnerabilities like prompt injections, tool poisoning, toxic flows, or vulnerabilities in agent skills.

Agent Scan v0.6 and later

Agent Scan reports scored risk indicators for threats such as prompt injection, exposure to untrusted or private data, destructive capabilities, and malicious agent skills.

Agent Scan operates in two main modes which can be used jointly or separately:

  1. Scan Mode: The CLI command snyk-agent-scan scans the current machine for agents and agent components such as skills and MCP servers. Upon completion, it will output a comprehensive report for the user to review.

  2. Background Mode (MDM). Agent Scan scans the machine in regular intervals in the background, and reports the results to a Snyk Evo instance. This can be used by security teams to monitor the company-wide agent supply chain in a central location. To set this up, please contact us.

How It Works

Scanning

Agent Scan searches through your local agent's configuration files to find agents, skills, and MCP servers. For MCP, it connects to servers and retrieves tool descriptions.

Interactive Consent for MCP Servers

⚠️ Security Note: Scanning an MCP config can execute its stdio commands or make outbound requests to its remote URLs. Always review what will be contacted before approving.

By default, Agent Scan prompts for user consent before contacting each discovered MCP server during interactive runs. This consent flow:

  • Shows the server name and its command or remote URL; environment variables and headers are redacted
  • Allows you to approve or decline each server individually
  • Prevents potentially untrusted servers from being contacted without your explicit permission
  • Records declined servers with a user_declined error (they are never contacted)

Best Practices:

  • Review commands, arguments, and remote URLs carefully before approving
  • When scanning untrusted or third-party MCP configs, run Agent Scan inside a sandbox (Docker, VM, or disposable environment)
  • Decline any servers with unfamiliar or suspicious commands

Non-interactive environments (e.g., background and push-key scans) inspect remote MCP servers automatically. They do not start stdio servers unless --dangerously-run-mcp-servers is set. Only use this flag in trusted environments where all MCP server commands and remote URLs have been verified.

Analysis and Validation

Agent Scan validates discovered components with local checks and the Agent Scan API. It sends the component information needed for analysis, including agent application details, MCP server configurations and signatures, tool names and descriptions, and skill content. Secrets in configuration values and text are redacted before transmission.

By using Agent Scan, you agree to the Snyk terms of use for Agent Scan.

Agent Scan does not store or log any usage data, i.e. the contents and results of your MCP tool calls.

CLI Parameters

The complete flag reference is in docs/cli-reference.md. Most commands and flags are shared across v0.5.x and v0.6 and later.

Shared commands

text
snyk-agent-scan scan [CONFIG_FILE...]       Scan MCP servers and skills (default)
snyk-agent-scan inspect [CONFIG_FILE...]    Inspect components without analysis
snyk-agent-scan help                        Display help

Options shared by both version lines

These options exist in both v0.5.x and v0.6 and later. Their command applicability is detailed in the full CLI reference.

text
--storage-file FILE               Path to store scan state (default: ~/.mcp-scan)
--analysis-url URL                Analysis endpoint; the default API version depends on the CLI version
--verification-H HEADER           Additional analysis request header (repeatable)
--mcp-oauth-tokens-path PATH      OAuth tokens for protected remote MCP servers
--verbose                         Enable detailed logging
--print-errors                    Show error details and tracebacks
--print-full-descriptions         Show full entity descriptions without truncation
--json                            Emit JSON; the response schema depends on the CLI version
--skip-ssl-verify                 Disable TLS certificate verification
--skills / --no-skills            Include skills (default) or skip them
--scan-all-users                  Scan all readable user home directories
--show-analysis-results           Force synchronous analysis so results display for push-key scans
--ci                              Exit non-zero when findings or operational failures remain
--server-timeout SECONDS          MCP connection timeout (default: 10)
--suppress-mcpserver-io BOOL      Suppress stdio MCP server stderr
--dangerously-run-mcp-servers     Skip consent and contact all configured MCP servers
--control-server URL              Upload destination (repeatable)
--control-server-H HEADER         Header for the current control-server block
--control-identifier ID           Identifier for the current control-server block
--no-bootstrap                    Accepted compatibility no-op; does not change behavior
--checks-per-server NUM           Accepted compatibility no-op; does not change behavior

Agent Scan v0.5.x

[!WARNING] v0.5.x is planned for deprecation. The examples pin v0.5.17 as a concrete v0.5.x release.

text
--analysis-url URL                Defaults to the 2025-09-02 analysis API
--ignore-issues-codes CODES       Comma-separated E/W security finding codes and X failure codes to ignore in CI

v0.5.x emits issue-code findings and path-keyed ScanPathResult JSON. See the v0.5.x CLI reference and issue-code reference.

Agent Scan v0.6 and later

text
--analysis-url URL                Defaults to the 2026-07-10 analysis API
--ignore-risks NAMES              Comma-separated risk names to omit from output and CI evaluation
--ignore-failure-codes CODES      Comma-separated X codes to omit from CI evaluation
--show-full-discovery             List every MCP entity and skill file instead of compact scan summaries

v0.6 and later emit scored risk indicators and scan_path_responses JSON. Human-readable scan output is compact by default; --show-full-discovery expands it without changing JSON or inspect output. See the v0.6-and-later CLI reference, risk reference, and failure-code reference.

Examples

bash
# Scan all known MCP configs and agent skills
snyk-agent-scan

# Scan a specific config file or skill
snyk-agent-scan ~/custom/config.json
snyk-agent-scan ~/path/to/my/SKILL.md

# Inspect without security analysis
snyk-agent-scan inspect

# CI mode
snyk-agent-scan --ci --dangerously-run-mcp-servers

Demo

This repository includes a vulnerable MCP server that demonstrates Model Context Protocol security findings that Agent Scan reports.

How to demo MCP security findings?

  1. Clone this repository
  2. Create an mcp.json config file in the cloned git repository root directory with the following contents:
jsonc
{
  "mcpServers": {
    "Demo MCP Server": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "mcp", "run", "demoserver/server.py"],
    },
  },
}
  1. Run the appropriate version:

    • Agent Scan v0.5.x (issue-code output): uvx --python 3.13 snyk-agent-scan@0.5.17 scan mcp.json
    • Agent Scan v0.6 and later (risk-based output): uvx --python 3.13 snyk-agent-scan@latest scan mcp.json

Note: if you place the mcp.json configuration filepath elsewhere then adjust the args path inside the MCP server configuration to reflect the path to the MCP Server (demoserver/server.py) as well as the uvx command that runs Agent Scan with the correct filepath to mcp.json.

Agent Scan is closed to contributions

Agent Scan does not accept external contributions at this time.

We welcome suggestions, bug reports, or feature requests as GitHub issues.

Development Setup

To run Agent Scan from source, follow these steps:

bash
uv run pip install -e .
uv run -m src.agent_scan.cli

Including Agent Scan results in your own project / registry

If you want to include Agent Scan results in your own project or registry, please reach out. There are designated APIs for this purpose. Using the standard Agent Scan API for large scale scanning is considered abuse and will result in your account being blocked.

Documentation

  • Documentation index — Versioned documentation for both CLI lines.
  • CLI reference — v0.5.x and v0.6-and-later commands, flags, options, and environment variables.
  • Scanning — v0.5.x and v0.6-and-later scanning behavior and examples.
  • JSON output — The v0.5.x path-keyed output and the v0.6 response schema.
  • Issue Codes — v0.5.x E* and W* security finding reference.
  • Risk reference — v0.6 security risk indicators, scores, and evidence fields.
  • Failure codes — v0.6 operational discovery, inspection, and analysis failures.

Further Reading

Changelog

See CHANGELOG.md.

安装

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "snyk-agent-scan": {
      "command": "uvx",
      "args": [
        "--python",
        "3.13",
        "snyk-agent-scan@latest",
        "scan",
        "--full-toxic-flows",
        "mcp.json"
      ]
    }
  }
}

将 Snyk Agent Scan MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Snyk Agent Scan 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 Snyk Agent Scan 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Snyk Agent Scan MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "snyk-agent-scan": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Snyk Agent Scan MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Snyk Agent Scan MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Snyk Agent Scan 帮我完成这项任务吗?
Snyk Agent Scan
当然,我看过了。
以下是我使用 Snyk Agent Scan 得到的结果。

常见问题

Snyk Agent Scan MCP 服务器有什么用途?

Snyk Agent Scan 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Snyk Agent Scan MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 Snyk Agent Scan。

为什么在 TypingMind 中使用 Snyk Agent Scan MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 Snyk Agent Scan 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Snyk Agent Scan MCP 连接到 TypingMind?

Snyk Agent Scan 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Snyk Agent Scan MCP 在 TypingMind 中提供哪些工具?

Snyk Agent Scan 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Snyk Agent Scan MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 Snyk Agent Scan 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇