OSV-Scanner-MCP
The server exposes OSV-Scanner-based MCP tools for vulnerability scanning and related intelligence.
Scan Java projects:
scan_java_projectscans Mavenpom.xmlor Gradlegradle.lockfileand returns severity-ranked CVE/GHSA reports with fixed versions.Suggest fixes:
suggest_fixproposes nearest safe upgrade versions for vulnerable Java dependencies usingsame_minor/major_internal/cross_majortiers and per-CVE fix details.Explain vulnerabilities:
explain_vulnerabilityfetches OSV details by GHSA/CVE ID, including CVSS, affected ranges, and references.Scan JAR/WAR artifacts:
scan_java_artifactbest-effort scans archive contents when lockfiles are unavailable, with incomplete-coverage warnings.Scan SBOMs:
scan_sbomchecks CycloneDX 1.4–1.6 or SPDX 2.2/2.3 JSON SBOMs for known vulnerable dependencies.
Provides vulnerability scanning for Java projects using Google's OSV database and OSV-Scanner, returning severity-ordered reports with CVE/GHSA details and fix suggestions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OSV-Scanner-MCPscan my Java project at /home/user/project for vulnerabilities"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OSV-Scanner-MCP
Google製 OSV-Scanner をラップするMCPサーバーです。Claude等のMCPクライアントから「このプロジェクトの脆弱性をチェックして」と自然言語で依頼するだけで、依存ライブラリの既知の脆弱性(CVE / GHSA)を深刻度順のレポートで取得できます。
ステータス: npmで公開中(
npx -y osv-scanner-mcp)。Java(Maven / Gradle)、JavaScript(npm / yarn / pnpm / bun)、Python(Poetry / uv / Pipenv / PDM / requirements.txt)、Go のlockfileに対応しています(修正版の推奨も4言語に対応)。MCPクライアントは Claude Code / Claude Desktop / Codex CLI / Antigravity / VS Code(GitHub Copilot)での利用手順を用意しています。
特徴
複数言語のワンショットスキャン:
scan_projectツールにプロジェクトパスを渡すだけで、Java・JavaScript・Python・Goのlockfileを検出してまとめてスキャンします。lockfileが無い・バージョンが未固定などでスキャンできなかった依存は、応答先頭のcoverageで明示しますJavaプロジェクトのスキャン:
scan_java_projectツールでJava(Maven / Gradle)のマニフェストだけを対象に、検出→スキャン→整形済みレポートまで一気に返しますJAR/WAR実体スキャン:
scan_java_artifactツールで、lockfileが無い・shaded/fat JARしか手元にないプロジェクトでもアーカイブ内メタデータから既知の脆弱性を検出します(ベストエフォート同定であることを明示するcoverage情報付き)SBOM入力スキャン:
scan_sbomツールでCycloneDX/SPDXのJSON SBOMに記録された依存を検査します。SBOMの網羅性や実成果物との一致は未検証であることを明示します深刻度順のレポート: パッケージごとに脆弱性をCVSSスコア順に整理し、5段階の深刻度ラベル(critical / high / medium / low / unknown)とサマリ集計付きで返します
修正版の提示: 各脆弱性の
fixed_versionsを含めます。MavenはMavenバージョン優先順位規則(2.17.1-RELEASEのようなsemver非対応の表記にも対応)、npm・GoはSemantic Versioningの優先順位で正しくソートしますセキュリティ第一の設計: シェル非経由の実行・引数ホワイトリスト・パス正規化と境界チェック・タイムアウト/出力サイズ上限を実装段階から組み込んでいます
Related MCP server: maven-mcp
動作要件
Node.js >= 20.19
OSV-Scanner バイナリ — 手動インストールは不要です。見つからない場合、公式GitHub Releasesからピン留めバージョンを自動ダウンロードし、パッケージに埋め込まれたSHA256チェックサムで検証してから使用します(
~/.cache/osv-scanner-mcp/にキャッシュ)手動インストール済みのバイナリ(PATH上または
OSV_SCANNER_PATH指定)があればそちらを優先します自動ダウンロードを無効化する場合は
OSV_MCP_AUTO_DOWNLOAD=0PATH上のバイナリを使わず常に検証済み自動ダウンロードを使う場合は
OSV_MCP_PREFER_DOWNLOAD=1(運用環境向け)
スキャン時と
explain_vulnerability実行時にネットワークアクセスが発生します。照会先はOSVデータベース(api.osv.dev)ですが、pom.xmlのスキャンでは推移的依存を解決するため deps.dev(api.deps.dev)にも接続します。詳細と無効化の方法は通信先とプライバシーを参照してください
セットアップ
Claude Code への登録
claude mcp add osv-scanner -- npx -y osv-scanner-mcpClaude Desktop への登録
claude_desktop_config.json に追加:
{
"mcpServers": {
"osv-scanner": {
"command": "npx",
"args": ["-y", "osv-scanner-mcp"]
}
}
}Codex CLI への登録
codex mcp add osv-scanner -- npx -y osv-scanner-mcpまたは ~/.codex/config.toml に追加:
[mcp_servers.osv-scanner]
command = "npx"
args = ["-y", "osv-scanner-mcp"]
startup_timeout_sec = 60 # 初回のnpxパッケージ取得に備えて延長
tool_timeout_sec = 300 # 既定60秒。バイナリ自動ダウンロード+スキャン(既定120秒)を見込んで延長注意: CodexのMCPツール実行タイムアウトは既定60秒です。本サーバーはスキャンのタイムアウトが既定120秒のため、初回のOSV-Scanner自動ダウンロードや大きめのプロジェクトのスキャンでは既定値のままだとCodex側が先にタイムアウトします。上記のように
tool_timeout_secの延長を推奨します。
Antigravity への登録
エージェントパネルの MCP Servers → Manage MCP Servers → View raw config で開く mcp_config.json に追加(Claude Desktopと同じ形式):
{
"mcpServers": {
"osv-scanner": {
"command": "npx",
"args": ["-y", "osv-scanner-mcp"]
}
}
}VS Code(GitHub Copilot)への登録
code --add-mcp '{"name":"osv-scanner","command":"npx","args":["-y","osv-scanner-mcp"]}'またはワークスペースの .vscode/mcp.json に追加(コマンドパレットの MCP: Add Server からも設定可能):
{
"servers": {
"osv-scanner": {
"type": "stdio",
"command": "npx",
"args": ["-y", "osv-scanner-mcp"]
}
}
}ソースから使う場合
git clone https://github.com/tedorigawa001/OSV-Scanner-MCP.git
cd OSV-Scanner-MCP
npm install
npm run build
# 登録時は `npx -y osv-scanner-mcp` の代わりに `node /path/to/OSV-Scanner-MCP/dist/index.js` を指定環境変数
変数 | 説明 |
| 使用するosv-scannerバイナリの明示指定。省略時はPATH→自動ダウンロードの順で解決。指定が無効な場合はフォールバックせずエラーになります(意図しないバイナリの実行防止) |
| 指定時、このディレクトリ配下以外のスキャンを拒否します(パストラバーサル対策の境界)。設定を推奨。空文字・空白のみは未設定として扱います |
|
|
| 同時実行できるスキャン数の上限(デフォルト |
|
|
|
|
|
|
|
|
推奨:
OSV_MCP_ALLOWED_ROOTは未設定でも動作しますが、その場合は任意の絶対パスをスキャンできてしまいます。悪意ある指示(プロンプトインジェクション)経由で意図しないディレクトリをスキャンさせられる経路を塞ぐため、プロジェクト置き場のルート(例:~/projects)を設定しておくことを推奨します。各クライアントの設定で"env": {"OSV_MCP_ALLOWED_ROOT": "/Users/you/projects"}のように渡せます(Codex CLIのTOMLでは[mcp_servers.osv-scanner.env]セクション)。
本番運用の推奨構成: 共有サーバーやCI等の運用環境では、次の3つをセットで設定してください。
OSV_MCP_ALLOWED_ROOT=/スキャン対象のルート— スキャン範囲の境界を固定
OSV_MCP_REQUIRE_ALLOWED_ROOT=1— 境界未設定なら起動を拒否(fail-closed)
OSV_SCANNER_PATH=/管理者所有の絶対パスまたはOSV_MCP_PREFER_DOWNLOAD=1— PATH解決に依存せず、実行するバイナリを固定依存の情報をどこに送るかは通信先とプライバシーを確認してください。どの設定でも、脆弱性照会のためパッケージの名前とバージョンは
api.osv.devに送られます。
通信先とプライバシー
osv-scanner v2.4.0 で接続先を実機確認した結果です(2026-10-07)。
操作 | 接続先 | 送られる情報 |
|
| パッケージの名前とバージョン。deps.dev には推移的依存の解決のため、 |
|
|
|
lockfileのスキャン( |
| パッケージの名前とバージョン(lockfileに全依存が記載済みのため、解決のための外部接続はしません) |
|
| 同定できたパッケージの名前とバージョン |
|
| 推奨を出したパッケージの名前(スキャンで照会済みのもの)と、推奨候補の版(公開されている修正版)。 |
|
| 指定した脆弱性ID |
バイナリの自動ダウンロード(初回のみ) | GitHub(公式Releases) | なし(ピン留めしたバージョンのバイナリを取得) |
api.osv.dev と deps.dev はどちらも Google が運営するサービスです。どの設定でも、スキャンしたパッケージの名前とバージョンは脆弱性照会のため api.osv.dev に送られます(オフラインでの照会には対応していません)。
deps.dev への送信を止めたい場合:
OSV_MCP_NO_REMOTE_RESOLUTION=1を設定すると、pom.xmlとrequirements.txtの推移的依存を解決しなくなり、接続先はapi.osv.devだけになります。止まるのは deps.dev への送信だけで、OSV への送信は続きます。また直接書いた依存しかスキャンされず、推移的依存の脆弱性を見落とします。この状態はscan_project/scan_java_project/suggest_fixの応答のdependency_resolutionにtransitive_resolution: "disabled"と警告で示されるので、検出0件と区別できます。推移的依存も含めて deps.dev を使わずにスキャンするには、lockfile方式(gradle.lockfile、poetry.lock等)を使ってください任意の取得先には接続しません: osv-scanner の
--data-source nativeモードは、スキャン対象のpom.xmlの<repositories>に書かれた任意のURLへ接続します(悪意あるpom.xmlで攻撃者のサーバーへ通信させられる)。本サーバーはこのモードを使わず、deps.devを明示指定しています
提供ツール
scan_project
プロジェクト内のlockfile・マニフェストを検出し、Java / JavaScript / Python / Go の依存をまとめてスキャンします。パッケージマネージャーやビルドは実行しません。
入力
パラメータ | 型 | 説明 |
| string | スキャン対象のプロジェクトディレクトリ、または対応するlockfile・マニフェストの絶対パス(直接指定したファイルはそれ1件だけをスキャン) |
対応ファイル
エコシステム | ファイル |
Java(Maven) |
|
JavaScript(npm) |
|
Python(PyPI) |
|
Go |
|
.git、node_modules、target、build、.venv、venv、site-packages、__pycache__、.tox、vendor とシンボリックリンクは探索しません。検出したファイルだけを形式を明示してOSV-Scannerに渡します(応答の coverage.manifests がそのままスキャン範囲です)。探索上限は scan_java_project と同じです。
requirements.txtは元のファイルをOSV-Scannerに渡しません。本サーバーが解析し、解釈できた依存の行だけを 名前==版 等の単純な形に直して専用の一時コピーに書き、それをスキャンします(スキャン後に削除)。OSV-Scannerは取り込み指定を独自に解釈してたどる(- r ../x.txt のような空白入りも取り込みとみなし、スキャン範囲の外のファイルを読む)ため、コピーには取り込み指定やオプションを一切含めません。取り込み(-r / --requirement)は、プロジェクトディレクトリ内の取り込み先だけを本サーバーが展開してコピーに含めます。
出力の読み方
{
"project_dir": "/path/to/project",
"dependency_resolution": { "transitive_resolution": "enabled" },
"coverage": {
"complete": false,
"warning": "一部の依存はスキャンされていないか、版を推測してスキャンしています(…)",
"manifests": [{ "path": "web/package-lock.json", "ecosystem": "npm", "format": "package-lock.json" }],
"lockfile_missing": [{ "path": "svc/package.json", "ecosystem": "npm", "status": "missing", "hint": "lockfileがありません。…" }],
"unpinned_requirements": [{ "file": "py/requirements.txt", "line": 2, "name": "Jinja2", "specifier": ">=2.0", "kind": "lower_bound" }],
"unscannable_requirements": [
{ "file": "py/requirements.txt", "line": 4, "text": "-e git+https://…", "reason": "編集可能インストール(-e)はスキャンされません" },
{ "file": "py/requirements.txt", "line": 5, "text": "-r ../shared/base.txt", "reason": "取り込み先がプロジェクトディレクトリの外のため展開しません" }
],
"skipped_files": []
},
"ecosystem_breakdown": { "npm": { "manifests": 1, "vulnerable_package_count": 2, "vulnerability_count": 4 } },
"vulnerable_package_count": 2,
"vulnerability_count": 4,
"severity_breakdown": { "critical": 0, "high": 2, "medium": 2, "low": 0, "unknown": 0 },
"packages": [
{ "name": "minimist", "version": "1.2.5", "ecosystem": "npm", "dependency_groups": ["dev"], "dependency_relation": "direct", "declared_in": ["package.json"], "vulnerabilities": [] },
{ "name": "qs", "version": "6.7.0", "ecosystem": "npm", "dependency_relation": "transitive", "introduced_by": ["express"], "vulnerabilities": [] }
]
}coverageを必ず確認してください。complete: falseの場合、一部の依存はスキャンされていないため、検出0件でも安全とは言えませんlockfile_missing: lockfileの無いマニフェスト(package.json、pyproject.toml、Pipfile、setup.py、build.gradle等)。同じディレクトリに同じエコシステムのlockfileがあれば記録しません。上位のディレクトリのlockfileだけがある場合は、package-lock.json(v2以降)にそのディレクトリが収録されていることを確認できたときだけ記録しません(npm workspaces)。収録されていなければstatus: "missing"、確認できない形式(yarn.lock、Python系等)ならstatus: "unconfirmed"として記録します。hintの手順でlockfileを生成してから再スキャンしてください(生成は信頼できる環境で)unpinned_requirements: requirements.txtのうち、版を固定していない行。kindはunpinned(版の指定なし)・range(>、<、!=、==1.*、範囲の組み合わせ等)・lower_bound(>=、~=)。unpinnedとrangeの行はOSV-Scannerがスキャンせず、lower_boundの行は下限の版を使用中の版とみなしてスキャンします(該当パッケージにはversion_is_lower_bound: trueが付き、実際の版とは異なる可能性があります)unscannable_requirements: スキャンされない行と理由。-e、name @ URL、パス指定、展開しなかった取り込み(プロジェクトディレクトリの外・存在しない・URL・上限超過)、制約ファイル(-c、適用しません)、解釈できないオプションや版の指定。解釈できない行は無視せず、ここに記録しますskipped_files: スキャン対象から外したファイルと理由(requirements.txt自体が読めない・1MiBを超える場合、pom.xmlの親POMが許可ルートの外を参照する場合)。親POMを読めず、親POMを含めずにスキャンしたpom.xmlもここに理由付きで示します(親POMの扱いを参照)各一覧は200件までで、超えた分の件数を
omitted_itemsに返します
ecosystem_breakdownは、脆弱性0件のエコシステムも含めて「スキャンした」ことを示しますdependency_relationは直接依存(direct)か推移的依存(transitive)かを示します。OSV-Scannerの出力にはこの区別がないため、本サーバーがスキャンしたファイルのコピーを解析して判定します:package-lock.json(v2以降): ルートとworkspaceのpackage.jsonの依存を、Nodeの解決規則(入れ子のnode_modulesから上位へ)で解決したものが直接依存、そこからたどれるものが推移的依存です。直接依存には宣言しているpackage.jsonをdeclared_inに、推移的依存にはそれを要求している直接依存の名前をintroduced_by(最大10件、超えた分はintroduced_by_omitted)に示します。直接依存でもあり他の依存からも要求される版はdirectとし、introduced_byも付けますgo.mod:// indirectの無いrequireが直接依存です。replaceで置き換えているモジュールにはreplaced_in_go_mod: trueを付けます(OSV-Scannerは置換先のパスと版で報告します)requirements.txt: ファイルに書かれた依存が直接依存、deps.devで解決された依存が推移的依存です上記以外の形式(
pom.xml、gradle.lockfile、yarn.lock、pnpm-lock.yaml、bun.lock、poetry.lock、uv.lock、Pipfile.lock、pdm.lock)と、lockfileVersion 1・どこからも要求されていないエントリはunknownです。複数のlockfileで判定が異なる場合はmixedです
dependency_groupsはOSV-Scannerが付けた依存グループ(例:dev)の生の値です。lockfileの形式によって欠落・不正確なため(pnpmでは付かず、pdmではoptionalになる等)、参考情報として扱ってください修正版の推奨(
suggest_fix)はJava・JavaScript・Python・Goに対応しています
scan_java_project
Java(Maven)プロジェクトをスキャンし、既知の脆弱性レポートを返します。
入力
パラメータ | 型 | 説明 |
| string | スキャン対象のプロジェクトディレクトリ、または pom.xml / gradle.lockfile の絶対パス |
Gradleプロジェクトについて: 本ツールはlockfile方式のみ対応です(ビルド実行方式は build.gradle の任意コード実行を伴うため、セキュリティ上の理由から採用していません)。
gradle.lockfileが無い場合は./gradlew dependencies --write-locksで生成してください(依存ロック未設定の場合はbuild.gradleにdependencyLocking { lockAllConfigurations() }の追加が必要です)。
スキャン範囲: ディレクトリを指定すると、配下の
pom.xml/gradle.lockfile/buildscript-gradle.lockfileを深さに関係なく検出し、検出したファイルだけをスキャンします(応答のmanifestsがそのままスキャン範囲です)。同じディレクトリにあるpackage-lock.jsonやrequirements.txtなどJava以外のファイルはスキャンしません。.git、node_modules、target、build、.idea、.vscodeとシンボリックリンクは探索しません。探索するエントリが20万件、またはマニフェストが1,000件を超える場合は、結果を黙って省略せずmanifest_search_limit_exceededを返します。pom.xmlなどのマニフェストを直接指定した場合は、ディレクトリを探索せずそのファイルだけをスキャンします(上限に達した場合の回避手段としても使えます)。
親POMの扱い
OSV-Scannerは pom.xml の <parent> が参照する親POM(<relativePath> の指すファイル。省略時はMavenの既定どおり ../pom.xml)を読み、親の親もたどって、そこに書かれた依存を結果に含めます。サブモジュールだけをスキャンしても親から引き継いだ依存を検出できるのはこのためです。
OSV_MCP_ALLOWED_ROOT を設定している場合、親POMの連鎖のどこかが許可ルートの外のファイルを参照する pom.xml は、スキャン対象から外します(許可ルート外のファイルの内容を結果や照会先に出さないため)。外したファイルは応答の skipped_manifests(scan_project では coverage.skipped_files)に理由付きで示し、scope_warning で「検出0件でも安全とは判断しない」旨を伝えます。全件が外れた場合や、該当する pom.xml を直接指定した場合は path_outside_allowed_root を返します。
存在する親POMを読めない場合(10MiBを超える、名前付きパイプ等の通常のファイルでない、末尾がシンボリックリンク等)は、その pom.xml を親POMを含めずにスキャンし、親から継承する依存が欠ける可能性を応答の incomplete_manifests(scan_project では coverage.skipped_files、coverage.complete は false)に理由付きで示します。子の pom.xml に依存が無く no_packages_found になる場合も、エラーのメッセージに同じ理由を含めます。親POMが存在しない場合(ルートの pom.xml で既定の ../pom.xml が無い等)は、元の配置でもOSV-Scannerは親を読まないため欠落として扱いません。
許可ルート内の親POMは従来どおり読みます(サブモジュールのスキャンは許可ルート内なら引き続き使えます)
<relativePath/>(空)はローカルの親POMを参照しないため対象外です親POMの指定は、OSV-Scanner(Go)のXMLの解釈に合わせて読みます。要素は名前空間の接頭辞に関係なく要素名で照合し(
<m:parent>も親として扱う)、ルート要素の直下のparentだけを対象にし、文字参照を展開しますXMLの仕様どおり、解析前に改行(CRLF・CR)をLFに正規化します
同じ解釈を保証できない場合は除外します: ルート直下の
parentやrelativePathが複数ある、CDATA・DOCTYPE・未知の実体参照・プロパティ参照(${...})がある、タグが閉じていない、UTF-8として読めない、relativePathに制御文字(改行・タブ等)・通常の空白以外の空白・書式文字が含まれる(通常の空白や日本語のディレクトリ名は使えます)親のGAVが一致しなければOSV-Scannerは読みませんが、本サーバーはGAVを確認せず、許可ルートの外に参照先のファイルがあれば安全側に除外します
OSV_MCP_ALLOWED_ROOTが未設定の場合は任意の絶対パスをスキャンできる状態のため、この検証は行いません
出力(成功時)
{
"project_dir": "/path/to/project",
"manifests": ["pom.xml"],
"dependency_resolution": { "transitive_resolution": "enabled" },
"source_files": ["/path/to/project/pom.xml"],
"vulnerable_package_count": 4,
"vulnerability_count": 14,
"severity_breakdown": { "critical": 3, "high": 3, "medium": 7, "low": 0, "unknown": 1 },
"packages": [
{
"name": "org.apache.logging.log4j:log4j-core",
"version": "2.14.1",
"ecosystem": "Maven",
"vulnerabilities": [
{
"id": "GHSA-jfh8-c2jp-5v3q",
"cve": "CVE-2021-44228",
"aliases": ["CVE-2021-44228"],
"severity_score": 10,
"severity": "critical",
"summary": "Remote code injection in Log4j",
"fixed_versions": ["2.3.1", "2.12.2", "2.15.0"]
}
]
}
]
}packagesは最も深刻な脆弱性を持つ順、各vulnerabilitiesは深刻度順(unknownは末尾)fixed_versionsはOSVに記載された修正版です。MavenはMaven優先順位、npm・GoはSemantic Versioningの優先順位で昇順(SemVerとして解釈できない表記は末尾)、PyPIはPEP 440の優先順位で昇順(v0.5.0以前は記載順)、その他のエコシステムはOSVの記載順のまま(並び順は保証しません)。複数のリリース系統(例: 2.12系バックポートと2.15系)が混在することがあります。プレリリース版(5.0.0-beta.3)やGoの疑似バージョン(0.0.0-20180925071336-cf3bd585ca2a)が含まれることもあります。空配列は「OSVに修正版の記載がない」ことを意味します。v0.4.1以前はMaven以外のパッケージで常に空配列を返していましたseverity_scoreが取得できない脆弱性はnull/"unknown"として扱います
scan_java_artifact
JAR/WARファイルの実体をスキャンします。既存のマニフェスト方式とは別ツールです。
{ "artifact_path": "/absolute/path/to/application.war" }artifact_path はJAR/WARファイル、または探索するディレクトリの絶対パスです。
ディレクトリ指定では target や build も探索します。.git、node_modules、.idea、.vscode と探索中のシンボリックリンクは除外します。
探索上限は深さ8・100ファイル・10,000エントリです。上限に達して探索を完了できない場合は、結果を黙って省略せず artifact_search_limit_exceeded を返します。対象を絞って再実行してください。
OSV_MCP_ALLOWED_ROOT による制限も適用されます。
OSV-Scanner 2.4.0の java/archive プラグインを使用し、ネストJARもスキャナー側で解析します。Javaコードやビルドは実行しません。
識別にはアーカイブ内メタデータを用いるため、除去済みメタデータやshaded/minimized JAR内の依存を見落とす場合があります。
出力の読み方:
先頭の
coverageにjars_found、jars_identified、unidentified_jarsを返します。件数はWARも含む、ファイルシステム上で列挙した外側のアーカイブ単位です。ネストJARの総数ではありません。artifacts[].statusはidentified_with_vulnerabilities/identified_without_known_vulnerabilities/unidentifiedの3値です。「同定済み」は少なくとも1件のMaven座標を取得できた意味であり、全依存の同定ではありません。coverage.completenessは常にincomplete。identified_vulnerability_count: 0は安全性の保証ではありません。packagesは同定できた脆弱なパッケージの詳細です。複数アーカイブに含まれる同一パッケージ・脆弱性は全体集計では重複排除します。JAR/WARが無い場合は
no_scannable_artifacts、全件同定不能の場合は警告を含む成功レポートです。
suggest_fix は引き続きマニフェスト方式専用です。experimentalプラグインを使うため、OSV-Scannerのピン留めバージョン更新時には、フラグとJAR/WARの出力形式も再検証してください。
信頼できないアーカイブの展開はOSV-Scannerのネイティブ処理に依存します。タイムアウト・出力上限はありますが、OSレベルのメモリ制限やサンドボックスを提供するものではありません。
scan_sbom
既存のSBOMに記録された依存をOSV-Scannerで照会します。SBOMの生成、ビルド、JARの実行は行いません。
{ "sbom_path": "/absolute/path/to/release-sbom.json" }対応形式: UTF-8 JSONのCycloneDX 1.4 / 1.5 / 1.6、SPDX 2.2 / 2.3。XML、SPDX tag-value、SPDX 3は未対応です。
入力: 16MiB以下のローカル通常ファイルの絶対パス。ファイル名は任意で、内容から形式を判別します。CycloneDXは
components、SPDXはpackages配列が必要です。形式・主要構造の確認であり、仕様全体のJSON Schema検証ではありません。識別情報: CycloneDXの
components[].purl、SPDXのpackages[].externalRefsにバージョン付きPackage URLを含めてください。例:pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1。詳細はOSV-Scanner公式ドキュメントを参照してください。安全な読み込み: 許可ルートと読み込み中のサイズ上限を確認し、権限制限付きの一時コピーだけをスキャンします。元ファイルは変更せず、一時コピーは成功・失敗ともに削除します。スキャン中にサーバーが終了した場合(SIGTERM/SIGINT/SIGHUP、MCPクライアントがstdinを閉じた場合)も、一時コピーを削除し実行中のOSV-Scannerを止めてから終了します。
出力の先頭にcoverageを返します。
identified_package_count: スキャナーが識別した、名前・バージョン・エコシステムの重複を除いたパッケージ数。既知脆弱性がないものも含みます。unidentified_packages: スキャナー出力に存在したものの、バージョン等が不足しているパッケージ。スキャナー自体が読み飛ばした項目は列挙できないため、この配列が空でも全件検査を意味しません。status: 識別できたものがあればpackages_identified、なければno_packages_identified。completeness/artifact_match: ともにnot_verified。SBOMの依存網羅性や、実際のJARと同一ビルドのものかは自動検証しません。
sbomには元ファイルのパス・形式・仕様バージョン・スキャンに用いた入力バイト列のSHA256を返します。identified_vulnerability_countとpackagesには識別できた依存の検出結果を返します。検出0件は「安全」の保証ではありません。 メタデータのないJARを補完するには、そのビルドに対応する正確なSBOMを別途用意してください。
不正JSONはinvalid_sbom、未対応形式はunsupported_sbom_format、入力上限超過はsbom_too_large、存在しない・読み取れないファイルはsbom_not_foundです。空のSBOMや識別できるパッケージがないSBOMは、警告付きの成功レポートになります。既存ツールと同じタイムアウト・出力上限・同時実行枠を使用します。
suggest_fix
scan_project と同じ検出・スキャンを実行し、脆弱なパッケージごとに推奨アップグレードバージョンを提案します。推奨はJava(Maven / Gradle)・JavaScript(npm)・Python(PyPI)・Goに対応しています。単純な最大バージョンではなく、現在のバージョンに最も近いリリース系統の修正版を3段階フォールバックで選定します:
Tier | 意味 |
| 現在と同じ系統内の修正版(最小の変更で済む) |
| 同一メジャー内の修正版(マイナーバージョンアップが必要) |
| メジャーアップグレードが必要(破壊的変更の可能性あり) |
npm・Go・PyPIの「同じ系統」は、npmの ^(キャレット)が互換とみなす範囲です(PyPIには共通の互換規則がありませんが、0.x系でマイナー更新が破壊的変更になるパッケージがあるため同じ規則で扱います。epochが変わる更新も cross_major)。1.0.0以上は Maven と同じく major.minor 単位ですが、0.x では同じ 0.minor 内だけを同じ系統とし、マイナー更新(0.3 → 0.4)は cross_major、0.0.x ではどの更新も cross_major として扱います(SemVerでは0.xの更新は互換を保証しないため)。
入力: scan_project と同じ(project_path)
出力(成功時)
{
"project_dir": "/path/to/project",
"manifests": ["pom.xml", "web/package-lock.json"],
"dependency_resolution": { "transitive_resolution": "enabled" },
"coverage": { "complete": true, "manifests": [ ... ], "lockfile_missing": [], "unpinned_requirements": [], "unscannable_requirements": [], "skipped_files": [] },
"vulnerable_package_count": 4,
"unfixed_vulnerability_count": 1,
"suggestions": [
{
"package": "org.apache.logging.log4j:log4j-core",
"current_version": "2.14.1",
"ecosystem": "Maven",
"recommended_upgrade": "2.25.4",
"upgrade_tier": "major_internal",
"verification": "verified",
"upgrade_note": "取得済みの影響範囲に基づき修正対象CVEの範囲外と確認した候補です",
"per_cve_detail": [
{ "id": "GHSA-jfh8-c2jp-5v3q", "cve": "CVE-2021-44228", "severity": "critical", "fixed_in": "2.15.0", "tier": "major_internal" }
]
}
]
}recommended_upgradeは既知の修正版を候補に、修正対象の全CVEの影響範囲外と確認できたものを3段階Tier順・バージョン昇順で選びます。CVEごとの修正版の最大値を単純に採用せず、別系統で再び影響を受ける候補も除外します。全公開版の中での最小性や未検出の脆弱性がないことは保証しません。OSVの影響範囲(
introduced/fixed/last_affected/ 上限なし)を照合します。MavenはMavenの優先順位でECOSYSTEM範囲を、npm・GoはSemantic Versioningの優先順位でSEMVER/ECOSYSTEM範囲を、PyPIはPEP 440の優先順位(1.8c1や2.8.0-rc0のような正規形でない表記も正規化)でECOSYSTEM範囲を使います。同じエントリにECOSYSTEM範囲があれば、コミット単位のGIT範囲は無視します。versionsに明示された影響も確認します(Gitのタグ名など版として解釈できない値は、解釈できる候補と一致しえないため無視します)。範囲欠落・不正・未対応形式(GIT等)・limitによる不完全な情報や、範囲の境界に解釈できない版(一部のGHSAに残る19.03.9、PyTorchの2.6.0-cu124のような表記)を含む場合は安全と推定せず、候補を検証できなければrecommended_upgrade: null、verification: "no_verified_candidate"を返します。プレリリース版(
5.0.0-beta.3、15.6.0-canary.61、Goの疑似バージョン、PyPIのrc・dev版。post版は正式版扱い)は、正式版の候補では全CVEを解消できない場合だけ推奨し、recommended_is_prerelease: trueを付けます。同じTierのプレリリースより、上のTierの正式版を優先します。推奨時は
verification: "verified"、CVEごとのrecommended_statusはaffected/not_affected/unknownです。推奨保留時はnot_evaluatedになります。per_cve_detail.fixed_inは各CVE単独の候補であり、最終推奨先の判定はrecommended_statusを参照してください。現在より新しい修正版候補がないCVEは
tier: "unfixed"として推奨の修正対象から除外します(情報欠落を含む場合があります)。除外したCVEも推奨先で判定し、その状態を表示します。全CVEがunfixedの場合もrecommended_upgradeはnullです。修正版の記載はあるがバージョンとして解釈できないCVE(SemVerでない13.0等)はtier: "unparseable_fix"とし、修正版が無いとは扱わず修正対象に残すため、推奨は保留(no_verified_candidate)になります。npm・Go・PyPIの提案には更新方法の
update_hintを付けます。PyPIでは、requirements.txtやpyproject.toml・Pipfileの指定を更新してlockfileを再生成し、推移的依存はpipの制約ファイル(-c)やuv・Poetryの上書き設定で版を指定します。推移的依存の場合、npmでは要求している直接依存の更新か、ルートのpackage.jsonのoverrides(ルートのプロジェクトでのみ有効)で版を指定します。Goではgo get <module>@<version>で更新できます。Goのv2以上のメジャーは別のモジュールパス(/v2等)としてOSV上も別パッケージになるため、新しいメジャー系列の修正版は候補に含まれません。現在の版が疑似バージョン(タグのないコミット)の場合はupgrade_noteに示します。推奨先のOSV照会: 推奨はスキャンで分かった脆弱性(現在の版に該当するもの)の範囲だけで検証しているため、推奨先に現在の版には該当しない新しい脆弱性がありえます(例: cryptography 3.2 の推奨候補 49.0.0 は、44.0.0 で混入し 50.0.0 で修正された2件に該当)。そこで推奨先を
api.osv.devに照会し、該当する脆弱性があれば、それも避けるよう修正版を候補に加えて選び直します(この例では 50.0.0 を推奨し、upgrade_noteに理由を示します)。結果はcandidate_checkに示します:clean: 推奨先に該当する既知の脆弱性はありませんhas_known_vulnerabilities: 避けられる修正版の候補が見つからず、推奨先が既知の脆弱性に該当します(recommended_known_vulnerabilitiesにID)conflict: OSVが、スキャンした脆弱性に候補が該当すると返しました(手元の範囲情報との食い違い)。他に候補がないため推奨を保留します(recommended_upgrade: null、verification: "no_verified_candidate")failed: 照会に失敗したか、応答の形式が不正でした(推奨はスキャンした脆弱性に対して検証済みのまま返します)skipped: 照会回数の上限(1パッケージ4回、1回の呼び出しで合計60回)のため照会していませんdisabled:OSV_MCP_NO_CANDIDATE_CHECK=1で無効化されています
照会するのは推奨を出したパッケージだけで、送るのはスキャンで既に照会したパッケージの名前と、推奨候補の版です。OSVの判定が手元の範囲情報と食い違う候補(スキャンした脆弱性に該当と返る候補)は推奨しません。不正な応答(オブジェクトでない応答・レコード、文字列でないページトークン)は「該当なし」とは扱わず失敗とします。照会で見つかった脆弱性は現在の版の脆弱性ではないため、
per_cve_detailには含めません。各提案には
scan_projectと同じdependency_relation(とintroduced_by/declared_in/replaced_in_go_mod)を付け、update_hintを直接/推移的依存の別に応じて具体化します(npmの推移的依存ならintroduced_byの直接依存の更新とoverrides、Goのreplaceならreplaceの版の更新、等)。unknown/mixedの場合は両方の場合を案内します。requirements.txtの
>=X/~=Xの行は、OSV-Scannerが下限Xを使用中の版とみなしてスキャンしています。この依存の提案にはversion_is_lower_bound: trueを付け、推奨は「下限を推奨版以上に引き上げる」意味であること(実際にインストールされる版とは異なりうること)をupgrade_noteに示します。推奨に未対応のエコシステム(SBOM由来のRubyGems等)は
verification: "unsupported_ecosystem"、現在の版をバージョンとして解釈できない場合(npmのgit・ローカルパス依存等)はverification: "unparseable_version"を返し、どちらもCVEごとのtier: "unsupported"としてunfixedには数えません(修正版の有無は判定していないため。修正版はscan_projectのfixed_versionsやexplain_vulnerabilityで確認できます)。応答の
coverageはscan_projectと同じです。lockfileの無いマニフェストや外したファイルがあればcomplete: falseになり、それらの依存は提案に含まれません。v0.4.2以前のskipped_manifests/scope_warningはcoverage.skipped_files/coverage.warningに統合しました。
explain_vulnerability
指定したGHSA-ID / CVE-IDの脆弱性の詳細をOSVデータベースAPI(api.osv.dev)から直接取得して返します(スキャンは実行しません)。スキャン結果の id をそのまま渡せます。クライアントLLMの知識カットオフ以降に公開された脆弱性の説明に特に有効です。
入力
パラメータ | 型 | 説明 |
| string | 脆弱性のID(例: |
出力(成功時): id / aliases / summary / details(説明markdown、4,000字上限)/ severity(CVSSベクトル)/ published / modified / affected(影響パッケージとバージョン範囲)/ references(アドバイザリ・修正コミット等のURL、http/httpsのみ・20件上限)
注意: OSVの正規IDはGHSA等のため、CVE-IDでは見つからない場合があります(その場合はエラーメッセージでGHSA-IDでの照会を案内します)。
出力(エラー時) — 全ツール共通
isError: true とともに、機械判読可能な kind を含むJSONを返します:
{
"error": {
"kind": "no_manifest_found",
"message": "対応マニフェスト(pom.xml / gradle.lockfile)が見つかりません: /path/to/project"
}
}kind | 意味 |
| OSV-Scannerが見つからない(インストール案内をmessageに含む) |
| 指定パスが存在しない・ディレクトリ/pom.xmlでない |
| 対応マニフェスト(pom.xml / gradle.lockfile)が見つからない |
| スキャン対象ファイル(一時ディレクトリへのコピー)の合計サイズが上限(2GiB)を超えた。対象を絞って再実行する |
| マニフェスト探索が上限(20万エントリ・1,000マニフェスト)に達した。より狭いディレクトリかマニフェストを直接指定する |
| バイナリのダウンロード失敗(未対応プラットフォーム含む) |
| ダウンロードしたバイナリのチェックサム不一致(改ざん/破損の可能性) |
| Gradleプロジェクトだがgradle.lockfileが無い(生成手順をmessageで案内) |
|
|
| スキャン対象パッケージなし(依存関係が未定義のpom.xml等) |
| OSV-Scannerが異常終了(stderr抜粋を |
| タイムアウト(デフォルト120秒) |
| 同時実行スキャン数が上限(デフォルト2)に達している。完了を待って再試行 |
| 出力がサイズ上限(デフォルト32MB)を超過 |
| 出力がJSONとして解釈できない |
| 脆弱性IDの形式が不正 |
| 指定IDの脆弱性がOSVデータベースに存在しない |
| OSV APIへのリクエスト失敗(ネットワーク・タイムアウト・非2xx) |
| 想定外のエラー(内部情報は返しません) |
セキュリティ設計
脆弱性診断ツール自体が攻撃経路にならないよう、以下を実装しています。
サプライチェーン対策: バイナリの自動ダウンロードは公式GitHub Releasesに限定し、バージョンをピン留め。パッケージに埋め込まれたSHA256チェックサムで検証します(配布元のSHA256SUMSファイルは信用しないため、リリース側が改ざんされても検出可能)。検証合格まで実行権限を与えず、キャッシュ済みバイナリも使用のたびに再検証します。
OSV_MCP_PREFER_DOWNLOAD=1でPATH上の未検証バイナリを使わない運用も選べますコマンドインジェクション対策: シェルを経由しない
spawn+ 引数配列で実行。OSV-Scannerへの引数は固定リストのみで、可変部は検証済み絶対パス1つだけスナップショット方式(検査と読み込みの不一致の防止): OSV-Scannerには元のファイルを一切渡しません。lockfile・
pom.xml(親POMの連鎖を含む)・JAR/WARは、本サーバーが安全に1回だけ読んだ内容を専用の一時ディレクトリ(所有者のみアクセス可、終了時に削除)へコピーしてスキャンし、検査もそのコピーに対して行います。検査の後で元のファイルやディレクトリを差し替えても結果には影響しません。親POMは元の配置を一時ディレクトリ内に再現してコピーするため、OSV-Scannerが相対パスで親をたどっても、見つかるのは検証してコピーしたファイルだけです(..を重ねて一時ディレクトリの外に届く参照は除外)。読み込みは末尾のシンボリックリンクをたどらず、名前付きパイプ等の通常のファイル以外は読まず(処理が止まらない)、読み終えた後にパスを解決し直して境界の内側かつ開いた実体と同じファイルかを確認します。コピーの合計サイズは2GiBまでです(超えるとscan_input_too_large)。SIGKILL等の捕捉できない終了で残った一時ディレクトリは、次回以降の起動時に削除します(名前が本サーバーの接頭辞に完全一致し、自分が所有する実体のディレクトリで、最終更新から24時間以上経過したものだけ。シンボリックリンクはたどりません)パストラバーサル対策: 入力パスは
realpathでシンボリックリンク解決後に境界チェック。pom.xml探索ではシンボリックリンクを辿りません。OSV-Scannerにはディレクトリを渡さず、検出したマニフェストだけを形式を明示して個別に渡します(ディレクトリを渡すと、OSV-Scannerが同じディレクトリのrequirements.txtも読み、その取り込み指定-r ../x.txtでスキャン範囲の外のファイルを読むため)。scan_projectでrequirements.txtをスキャンする場合は元ファイルを渡さず、解釈できた依存の行だけを正規化して書いた専用コピーをスキャンします。コピーには取り込み指定を含めないため、OSV-Scannerの取り込みの解釈と本サーバーの解析がずれても、範囲外のファイルは読まれません。pom.xmlの親POMの連鎖がOSV_MCP_ALLOWED_ROOTの外を参照する場合は、そのpom.xmlをスキャン対象から外します(親POMの扱い)DoS対策: タイムアウト・stdout上限・stderr抜粋上限を設定。スキャン結果は防御的にパースし、形式不正でも例外を投げません。同時実行スキャン数も上限(デフォルト2)を設け、並列リクエストによるプロセスの無制限起動を防ぎます。本サーバー自身の解析も、同じファイルは1回だけ読んで結果を使い回し(workspaceの収録確認でのlockfile、requirements.txtの共通の取り込み先、親POM)、読む量の合計に上限を設けます
fail-closedな運用モード:
OSV_MCP_REQUIRE_ALLOWED_ROOT=1で、スキャン許可ルート未設定時にサーバーの起動自体を拒否できます通信先の固定と明示: osv-scannerの依存解決先は
deps.devを明示指定し、スキャン対象のpom.xmlが指定する任意のリポジトリへ接続するモード(--data-source native)は使いません(テストで保証)。通信先の一覧と、deps.devへの送信を止めるOSV_MCP_NO_REMOTE_RESOLUTION=1は通信先とプライバシーを参照情報漏えい対策: 想定外の例外はスタックトレース等を含めず
internal_errorに丸めます。外部由来のテキスト(脆弱性summary等)は長さ上限付きの「データ」として構造化して返しますプロンプトインジェクション対策: OSVデータベース由来のテキスト(summary / details / ID等)とOSV-Scannerのstderrは、LLMクライアントへ返す前にサニタイズします。制御文字(ANSIエスケープ含む)・ゼロ幅文字・双方向制御文字(RLO等)・Unicodeタグ文字(不可視のテキスト密輸)・行区切り(U+2028/2029)を除去し、NFC正規化を適用。外部データの読み取りアクセサを単一のサニタイズ境界にすることで適用漏れを防いでいます
開発
npm test # テスト実行(vitest)
npx vitest run --coverage # カバレッジ計測
npm run typecheck # 型チェック
npm run build # dist/ へビルド設計メモ・残課題は docs/DESIGN_TODO.md を参照してください。
ロードマップ
suggest_fixツール: 現在のバージョンに最も近い系統の修正版を提案(3段階Tierフォールバック)explain_vulnerabilityツール: 脆弱性の詳細説明(OSV API経由)npmパッケージ化(
npx osv-scanner-mcp)OSV-Scannerバイナリの自動ダウンロード(チェックサム検証付き)
Gradle対応(lockfile方式)
scan_java_artifactツール: JAR/WAR実体スキャン(lockfileが無い・shaded/fat JARのみのプロジェクト向け)scan_projectツール: Java / JavaScript / Python / Go のlockfileをまとめてスキャンsuggest_fixのJavaScript / Go対応(semver)suggest_fixのPython対応(PEP 440)直接/推移的依存の区別(npm・Go・requirements.txt)
ライセンス
Available Tools
6 toolsexplain_vulnerability脆弱性の詳細説明の取得A
指定したGHSA-IDまたはCVE-IDの脆弱性の詳細をOSVデータベース(api.osv.dev)から取得して返す。説明(details)・CVSSベクトル・影響を受けるパッケージとバージョン範囲・参照リンク(アドバイザリや修正コミット)が含まれる。scan_java_projectやsuggest_fixの結果に含まれるIDをそのまま渡せる。スキャンは実行しない。
| Name | Required | Description | Default |
|---|---|---|---|
| vulnerability_id | Yes | 脆弱性のID(例: GHSA-jfh8-c2jp-5v3q、CVE-2021-44228) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states that the tool performs an external API lookup, returns specific data fields, and does not execute scanning, which are the key behavioral traits an agent needs. It does not mention potential network failures or rate limits, but for a read-only lookup tool, the disclosed behavior is sufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three concise sentences in Japanese, starting with the core action, then the returned fields, then usage context and a clear non-scan caveat. Every sentence earns its place with no fluff or duplication of schema details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple one-parameter interface, the fully self-describing input schema, and the absence of an output schema, the description is complete enough. It explains the data source, the input, the output fields, the relationship to sibling tools, and the key behavioral constraint (no scanning), so an agent can invoke it correctly without additional information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents vulnerability_id with examples and length constraints (100% coverage). The description adds valuable semantic context by stating that IDs from scan_java_project or suggest_fix can be passed directly, which helps the agent understand the expected value and provenance of the parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('取得して返す' fetch and return), a specific resource (OSV database at api.osv.dev), and the input type (GHSA-ID or CVE-ID). It explicitly lists the returned contents (details, CVSS, affected packages, references), which clearly distinguishes this from the sibling scan_java_project and suggest_fix tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly indicates this tool is for retrieving vulnerability details from IDs obtained via scan_java_project or suggest_fix, and explicitly states that scanning is not performed. This gives an agent clear contextual guidance on when to invoke it, though it does not explicitly state 'when not to use' for all alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scan_java_artifactJAR/WAR実体の脆弱性スキャンA
JAR/WARファイルまたはディレクトリ内の実体をスキャンする。ビルドやJavaコードの実行は行わない。メタデータによるベストエフォート同定のため、coverageと同定不能ファイルを必ず確認すること。completenessは常にincomplete。検出0件でも安全性や全依存の同定を保証しない。
| Name | Required | Description | Default |
|---|---|---|---|
| artifact_path | Yes | JAR/WARファイル、または探索するディレクトリの絶対パス |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It transparently discloses that no build or code execution occurs, that identification is best-effort based on metadata, that completeness is always incomplete, and that zero findings do not guarantee safety. This is strong behavioral transparency, though it does not describe return format or pagination.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three concise sentences, each adding value: the action, what it avoids, and critical result-interpretation caveats. The most important information is front-loaded, with no fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the single parameter and lack of output schema, the description explains key limitations (coverage, incompleteness, no guarantee) that an agent needs to correctly interpret results. It does not detail the output structure, but the caveats about coverage and unidentifiable files imply the output contains these, which is sufficient for safe usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the description does not add details beyond what the schema already states for artifact_path. It aligns with the schema's description of the parameter, but no extra semantics are provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool scans entities inside JAR/WAR files or directories, explicitly distinguishing it from source-level scanning (scan_java_project) and noting it does not execute builds or Java code. The verb+resource combination is specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the resource type (JAR/WAR vs. source code), but there is no explicit mention of when to use this over scan_sbom or scan_java_project. The description does provide guidance on interpreting results (check coverage, unidentifiable files) but lacks explicit alternative routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scan_java_projectJavaプロジェクトの脆弱性スキャンA
Java(Maven)プロジェクトをGoogle OSV-Scannerでスキャンし、依存ライブラリの既知の脆弱性(CVE/GHSA)を深刻度順のJSONレポートで返す。レポートにはパッケージごとの脆弱性一覧(CVSSスコア・5段階深刻度・修正版バージョン)とサマリ集計が含まれる。Maven(pom.xml)とGradle(gradle.lockfile)に対応。dependency_resolution.warningがある場合は推移的依存がスキャン対象外のため、検出0件でも安全とは判断しないこと。
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | スキャン対象のプロジェクトディレクトリ、またはpom.xml/gradle.lockfileの絶対パス |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses the scan engine, the report shape (per-package vulnerability list with CVSS score, 5-level severity, fixed version, plus summary aggregates), and a critical non-obvious caveat that a transitivity warning invalidates a zero-finding result. It omits operational traits such as network dependency on the OSV API, credentials, or runtime expectations, which keeps it short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four sentences, each load-bearing: purpose plus report format, report contents, supported build systems, and the safety caveat. The purpose is front-loaded and there is no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description must describe returns and it does so concretely (severity-ordered JSON, CVSS, severity level, fixed versions, summary aggregation). Combined with the transitive-dependency caveat, an agent has enough to call and interpret the tool, though environment prerequisites (network access, scan duration) are not addressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and there is only one parameter (project_path), whose meaning is fully documented in the schema itself as a project directory or absolute path to pom.xml/gradle.lockfile. The description adds no syntax, path-form, or default detail beyond the schema, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb and resource (scanning a Java/Maven project with Google OSV-Scanner) and states exactly what is returned (known CVEs/GHSA in severity-ordered JSON). It narrows scope with supported build systems (pom.xml, gradle.lockfile), which implicitly separates it from scan_sbom and scan_java_artifact. However, it never names or contrasts a sibling explicitly, so an agent must infer the boundary against scan_project and scan_java_artifact.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use/when-not-to-use statement or named alternative. Usage is only implied by the supported inputs (Maven pom.xml, Gradle gradle.lockfile), and the closing caveat tells the agent not to conclude safety when dependency_resolution.warning is present. That is useful operational guidance but not sibling routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scan_projectプロジェクトの依存の脆弱性スキャン(Java / JavaScript / Python / Go)A
プロジェクト内のlockfile・マニフェストを検出し、依存ライブラリの既知の脆弱性(CVE/GHSA)をまとめてスキャンする。対応: Java(pom.xml / gradle.lockfile)、JavaScript(package-lock.json / npm-shrinkwrap.json / yarn.lock / pnpm-lock.yaml / bun.lock)、Python(poetry.lock / uv.lock / Pipfile.lock / pdm.lock / requirements.txt)、Go(go.mod)。パッケージマネージャーやビルドは実行しない。応答先頭のcoverageを必ず確認すること: lockfileが無いマニフェスト、バージョン未固定のrequirements行、スキャン対象から外したファイルを示す。各パッケージのdependency_relationは直接依存(direct)か推移的依存(transitive)か(package-lock.json・go.mod・requirements.txtで判定。それ以外はunknown)。coverage.complete=falseの場合は、検出0件でも安全とは判断しないこと。修正版の推奨(suggest_fix)はJava・JavaScript・Python・Goに対応。
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | スキャン対象のプロジェクトディレクトリ、または対応するlockfile・マニフェストの絶対パス |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden and does so well: it states that package managers/builds are NOT executed, explains the coverage block (manifests without lockfiles, unpinned requirement lines, excluded files), and defines dependency_relation as direct/transitive/unknown with which files yield which. It omits any note on permissions or runtime cost, keeping it from a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core purpose, then proceeds through supported files, behavioral caveats, and the coverage warning in a logical order. It is dense and somewhat long, but each clause adds operational detail rather than filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description must explain the return shape, and it does specify the leading coverage object, its false case, and per-package dependency_relation. The picture is largely complete, though the exact findings format and suggest_fix linkage to the separate sibling are left implicit.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the single project_path parameter, and the description adds no new semantics beyond what the schema already states (directory or absolute lockfile/manifest path). Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource (detect lockfiles/manifests and scan dependencies for known CVE/GHSA vulnerabilities) and enumerates the supported ecosystems and exact filenames, which is unusually precise. However, it never distinguishes itself from overlapping siblings like scan_sbom and scan_java_project, which an agent must choose between, so it falls short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It implicitly defines when to use it by listing the ecosystems and file types it handles, and it gives a critical caution about coverage.complete=false. But it offers no explicit routing versus scan_sbom, scan_java_project, or scan_java_artifact, so the agent cannot tell when this tool is preferred over those.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scan_sbomSBOMの脆弱性スキャンA
CycloneDX 1.4/1.5/1.6またはSPDX 2.2/2.3のJSON SBOMから識別できる依存をスキャンする。ビルドやJARの実行は行わない。入力は16MiB以下のローカルファイル。SBOMの網羅性・鮮度・実成果物との一致は未検証であり、検出0件でも安全性を保証しない。
| Name | Required | Description | Default |
|---|---|---|---|
| sbom_path | Yes | CycloneDX/SPDX JSON SBOMファイルの絶対パス |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does an excellent job: it discloses that only SBOM-identifiable dependencies are scanned, that builds/JARs are not executed, that SBOM comprehensiveness/freshness/artifact-match are unverified, and that zero detections do not guarantee safety. These limitations are highly useful for an agent deciding how to interpret results.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact, front-loaded with the core scanning behavior and supported formats, and every sentence adds operational value. It states scope, exclusions, input constraints, and key limitations without redundancy or padding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter tool with no annotations and no output schema, the description is quite complete: input format, size, local-file requirement, non-execution behavior, and result caveats are all covered. The main gap is that it does not describe the return value or output structure of the scan, which would help an agent know what to expect after calling it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already defines sbom_path as an absolute path to a CycloneDX/SPDX JSON SBOM file, with 100% coverage. The description adds meaningful constraints beyond the schema: supported format versions, the 16MiB size limit, and that the input must be a local file, which helps the agent validate the parameter before calling the tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('スキャンする') and resource ('CycloneDX 1.4/1.5/1.6またはSPDX 2.2/2.3のJSON SBOM'), and states what is scanned: dependencies identifiable from the SBOM. It is clearly distinguished from siblings like scan_java_project and scan_java_artifact by focusing on an SBOM file input rather than a project or artifact.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description establishes clear usage context: this tool is for scanning a local JSON SBOM file, with a 16MiB size limit, and explicitly says it does not build or execute JARs. It does not explicitly name sibling alternatives or exclusion conditions, but the input constraints and non-execution note make the intended scenario reasonably clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
suggest_fix脆弱性を解消する推奨アップグレードの提案A
scan_projectと同じ検出でプロジェクトをスキャンし、脆弱な依存パッケージごとに推奨アップグレードバージョンを提案する。推奨はJava(Maven / Gradle)・JavaScript(npm)・Python(PyPI)・Goに対応。現在のバージョンに最も近いリリース系統の修正版を優先する3段階フォールバック(same_minor: 同一系統内 → major_internal: 同一メジャー内 → cross_major: メジャーアップグレード)で選定し、推奨バージョン・アップグレード距離(upgrade_tier)・CVEごとの修正版を返す。npm・Go・PyPIでは0.x系のマイナー更新もcross_major(破壊的変更の可能性)。requirements.txtの下限(>=)でスキャンした依存はversion_is_lower_boundを付け、推奨は下限の引き上げを意味する。直接/推移的依存の別(dependency_relation、npmはintroduced_by・declared_in)に応じて更新方法(update_hint)を示す。推奨先はapi.osv.devに照会し、現在の版には該当しない既知の脆弱性があれば避けて選び直す(結果はcandidate_check。has_known_vulnerabilities・failed・skippedの場合は推奨先の安全性が確認できていない。conflictは判定の食い違いで推奨を保留)。候補を全修正対象CVEの影響範囲と照合し、情報不足の場合は推奨を保留する。プレリリース版は正式版で解消できない場合だけ推奨し、recommended_is_prereleaseを付ける。現在より新しい修正版候補のないCVEはunfixedとして別表示し、推奨先での判定も返す。応答のcoverageを必ず確認すること(complete=falseなら提案に含まれない依存がある)。dependency_resolution.warningがある場合は推移的依存の脆弱性が提案に含まれない。
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | スキャン対象のプロジェクトディレクトリ、または対応するlockfile・マニフェストの絶対パス |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations to carry the load, the description discloses substantial behavior: the three-tier fallback selection (same_minor/major_internal/cross_major), candidate_check safety re-query against api.osv.dev, handling of prerelase and unfixed CVEs, coverage and dependency_resolution.warning caveats. This is exactly the kind of behavioral context an agent needs for a complex remediation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose is front-loaded in the first sentence and nearly every subsequent sentence conveys distinct behavioral detail, so little is wasted. However it is delivered as one dense unbroken paragraph with no structuring, which makes the rich detail harder to scan than it needs to be.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no annotations and no output schema, the description covers the return semantics extensively (upgrade_tier, version_is_lower_bound, dependency_relation/update_hint, recommended_is_prerelease, candidate_check, unfixed, coverage). An agent has everything needed to interpret results and handle caveats correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and there is a single parameter, so the schema already documents project_path fully; the description adds no extra meaning about the parameter. Baseline of 3 applies when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: it scans the project with the same detection as scan_project and proposes a recommended upgrade version per vulnerable dependency. It explicitly names the sibling scan_project and clarifies how it differs (same scan, plus fix recommendations), so an agent can distinguish it from the other scan_* tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied through the reference to scan_project (same detection, but adds remediation) and post-call guidance to verify coverage, but there is no explicit when/when-not statement or alternative routing (e.g. when to prefer scan_project or explain_vulnerability). It is enough to infer intent but leaves the choice among siblings to the agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.7.1- Added
scan_project - Changed
suggest_fix1 field changed- changed
Input schema / properties / project_path / descriptionPrevious value: -"スキャン対象のプロジェクトディレクトリ、またはpom.xml/gradle.lockfileの絶対パス"New value: +"スキャン対象のプロジェクトディレクトリ、または対応するlockfile・マニフェストの絶対パス"
2 tool updates
v0.3.0- Added
scan_java_artifact - Added
scan_sbom
3 tool updates
v0.1.11- Added
explain_vulnerability - Changed
scan_java_project1 field changed- changed
Input schema / properties / project_path / descriptionPrevious value: -"スキャン対象のプロジェクトディレクトリまたはpom.xmlの絶対パス"New value: +"スキャン対象のプロジェクトディレクトリ、またはpom.xml/gradle.lockfileの絶対パス"
- Added
suggest_fix
1 tool update
v0.1.0- First observed
scan_java_project
TDQS
Scored across 6 tools
scan_project, scan_java_project, and suggest_fix all perform project scanning, and scan_project already covers Java Maven/Gradle, making scan_java_project largely redundant. scan_java_artifact and scan_sbom are distinct by input type, but the boundary between generic and Java-specific project scans is fuzzy.
All names use snake_case and follow a clear verb_noun or verb_object pattern such as scan_*, explain_*, and suggest_*. Minor ordering variation in scan_java_project versus scan_project is readable and consistent overall.
Six tools is well-scoped for a vulnerability scanner and remediation server. Each tool covers a distinct input type or action without obvious bloat.
The core lifecycle is covered: scanning projects, Java artifacts, and SBOMs; explaining individual vulnerabilities; and suggesting fixes. Some gaps remain, such as no general non-Java artifact scanning or batch fix application, but agents can work around these.
Maintenance
Related MCP Connectors
Scan packages and lockfiles (npm, PyPI, Go, Maven, Cargo, NuGet) for vulnerabilities and malware.
41Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Vulnerability management: scan projects, search sealed packages, manage sealing rules and reports.
Scan code for quantum-vulnerable cryptography and get NIST post-quantum migration guidance.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables security scanning of code projects to identify common vulnerabilities like XSS, injections, SSRF, and path traversal issues. Provides local, offline scanning with severity-grouped results and actionable fix suggestions for improving code security.38 npm-
- AlicenseBqualityDmaintenanceEnables searching Maven Central artifacts, retrieving versions, and analyzing dependencies via natural language.5MIT
- FlicenseNot gradedqualityCmaintenanceScans Python, Node.js, Java/Spring, and PHP dependency manifests for known vulnerabilities using OSV and GitHub Advisory APIs.-
- AlicenseNot gradedqualityDmaintenanceEnables scanning projects for dependency vulnerabilities, secrets, license conflicts, code quality, and git health, returning a 0-100 health score with actionable suggestions.7 npmMIT