mcpField
O
owasp-scan

owasp-scan

Local
github.com/GuardBeeSecurity1Updated 1d ago

About owasp-scan

owasp-scan is a CLI and MCP server for unified OWASP MCP Top 10 checks. It scans code, grades a live server's tool list or a saved tools/list response, and reports findings with an A–F grade.

Key features

  1. 01Runs seven auditors in one code scan
  2. 02Checks live servers or saved tool lists
  3. 03Reports OWASP IDs and A–F grades
  4. 04Text, JSON, and SARIF output
  5. 05Can inventory configured servers with --discover-shadow

Use cases

  1. 01Run a consolidated repository security scan
  2. 02Grade tools exposed by a live MCP server
  3. 03Add SARIF findings to GitHub code scanning
  4. 04Review configured servers for shadow MCP entries

MCP support

It exposes owasp_scan_path, owasp_scan_live, owasp_scan_catalog, and list_owasp_coverage. The live mode connects to an MCP server and calls tools/list.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"guardbee-owasp-scan": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-owasp-scan"
]
}
}
}
Run commandnpx -y @guardbee/mcp-owasp-scan

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@guardbee/mcp-owasp-scan0.4.0

Tools

4

Saved tool list · updated 2d ago

ParameterTypeRequiredDescription
pathstringYesFile or directory to scan
maxFilesintegerNo
allowlistPathstringNoAllowlist file for Shadow MCP discover
discoverShadowbooleanNoAlso discover Shadow MCP on this host (MCP09)

Details

From the project README

@guardbee/mcp-owasp-scan

🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch

npm version npm downloads License: MIT

One CLI and MCP server for a unified OWASP MCP Top 10 check. It runs seven GuardBee auditors over a codebase in one pass, or grades a live MCP server's tool list, and reports every finding under its OWASP id with an A–F grade. Output as text, JSON or SARIF for GitHub code scanning.

Telemetry is off by default. With GUARDBEE_TELEMETRY=1 it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields like content, token or password are replaced with a placeholder. See @guardbee/mcp-telemetry.

Quick start

# Static scan of a repository, fail CI on high or critical findings
npx @guardbee/mcp-owasp-scan scan ./src --format=sarif --fail-on=high > owasp.sarif

# Connect to a running MCP server and grade its tools
npx @guardbee/mcp-owasp-scan live --url=https://mcp.example.com/mcp
npx @guardbee/mcp-owasp-scan live --stdio=npx --arg=-y --arg=@modelcontextprotocol/server-filesystem --arg=.

# Grade a saved tools/list response
npx @guardbee/mcp-owasp-scan catalog ./tools.json --format=json

As an MCP server (Claude Desktop, Cursor, VS Code):

{
  "mcpServers": {
    "guardbee-owasp-scan": {
      "command": "npx",
      "args": ["-y", "@guardbee/mcp-owasp-scan"]
    }
  }
}

Modes

ModeInputWhat runs
scan <path>A file or directorysecret-scanner, mcp-server-auditor, oauth-auditor, audit-gap-auditor, context-oversharing-auditor, toxic-flow-auditor, tool-poisoning-scanner
live--url=<streamable HTTP URL> or --stdio=<command> with --arg=…Connects, calls tools/list, then toxic-flow-auditor and tool-poisoning-scanner
catalog <tools.json>A tools/list dump ({ "tools": [...] } or a bare array)Same checks as live, offline

scan reads TypeScript/JavaScript, Python (FastMCP, official SDK, low-level server) and Go (official go-sdk, mark3labs/mcp-go) MCP servers in full: tool definitions, handler sinks and OAuth rules. Other languages (Rust, Java, Kotlin, C#, Ruby, PHP, Swift) get the language-neutral rules only (secrets, URLs, config). The report's coverage lists every source file with its language, that depth (full or patterns) and the number of tool definitions found, plus a per-language summary (languages: in text output), so a file the scan could not read deeply is visible rather than silently passing.

--discover-shadow adds an MCP09 check to scan: it inventories the MCP servers configured on this machine (Cursor, Claude Desktop, Windsurf, VS Code) through mcp-config-auditor, and --allowlist=<path> marks the approved ones.

OWASP MCP Top 10 coverage

IDRiskCovered by
MCP01Token / credential exposuresecret-scanner, mcp-server-auditor
MCP02Privilege / excessive agencymcp-server-auditor
MCP03Tool poisoning / rug pull surfacetool-poisoning-scanner (scan, live, catalog)
MCP04Supply chainNot in this meta-scan: use mcp-dependency-auditor and mcp-slopsquat-scanner, which need the network
MCP05Command / code injection via toolsmcp-server-auditor
MCP06Prompt / context injectionNot in this meta-scan: use mcp-prompt-injection-scanner on the content an agent reads
MCP07Auth / OAuth misconfigurationoauth-auditor
MCP08Lack of audit and telemetryaudit-gap-auditor
MCP09Shadow MCP serversmcp-config-auditor (--discover-shadow)
MCP10Toxic flows / context oversharingtoxic-flow-auditor, context-oversharing-auditor (scan, live, catalog)

Grade

GradeWhen
FA lethal trifecta: one agent can read untrusted content, reach sensitive data and send data out
DAny critical finding
CAny high finding
BOnly medium or low findings
ANo findings

CLI options

OptionDefaultMeaning
--format=text|json|sariftextReport format. SARIF uploads to GitHub code scanning
--fail-on=any|critical|high|medium|noneanyExit 1 when a finding at or above this severity exists
--max-files=<n>5000Stop a path scan after this many files
--discover-shadowoffAdd the MCP09 host inventory to scan
--allowlist=<path>–Approved servers for --discover-shadow

Exit codes: 0 clean (or below --fail-on), 1 findings at or above --fail-on, 2 usage error.

MCP tools

ToolWhat it does
owasp_scan_pathThe scan mode over a path (path, maxFiles, discoverShadow, allowlistPath)
owasp_scan_liveThe live mode (url, or command with args)
owasp_scan_catalogThe catalog mode on a JSON string
list_owasp_coverageThe coverage table above

GitHub Actions

- run: npx -y @guardbee/mcp-owasp-scan scan . --format=sarif --fail-on=high > owasp.sarif
- uses: github/codeql-action/upload-sarif@v3
  if: always()
  with:
    sarif_file: owasp.sarif

Related packages

Each auditor is also its own package with more options: mcp-secret-scanner, mcp-server-auditor, mcp-oauth-auditor, mcp-audit-gap-auditor, mcp-context-oversharing-auditor, mcp-toxic-flow-auditor, mcp-tool-poisoning-scanner, mcp-config-auditor. To enforce these rules at runtime instead of finding them in code, put mcp-security-proxy in front of your MCP servers.

Feedback

Questions, ideas, or a false positive? Start a thread in GitHub Discussions or open an issue. If GuardBee is useful to you, a ⭐ on the repository helps others find it.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.