로컬에 클론된 데이터베이스에서 GitHub Security Advisories를 조회하여 소프트웨어 생태계의 취약점을 식별합니다.
다른 이름 microsoft/github-advisory-mcp
- 스타
- 9
- Tools
- 12
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 11월 4일
- 라이선스
- MIT
GitHub Advisory MCP란?
GitHub Advisory은(는) MCP server입니다. 로컬에 클론된 데이터베이스에서 GitHub Security Advisories를 조회하여 소프트웨어 생태계의 취약점을 식별합니다. 12개 도구를 제공합니다. 예: ghsa_id, cve_id, ecosystem.
프로젝트 README에서 생성된 요약
GitHub Advisory MCP server 정보
이 MCP server는 GitHub Security Advisories의 로컬 데이터베이스를 조회하여 소프트웨어 취약점을 식별할 수 있는 기능을 개발자에게 제공합니다. 매번 쿼리를 실행할 때마다 외부 네트워크 호출에 의존하지 않고 수십만 개의 advisory 파일을 검색할 수 있는 방법을 제공합니다. 이 server는 stdio 또는 HTTP를 통해 실행 가능한 MCP server와 JSON advisory 파일이 클론된 저장소와 인터페이스하는 로컬 Express REST API로 구성된 2계층 구조로 작동합니다.
GitHub Copilot과 함께 VS Code를 사용하는 개발자는 이 server를 통합하여 npm, pip, maven과 같은 특정 생태계의 심각도가 높은 이슈를 찾을 수 있습니다. 설정 시 advisory 데이터베이스의 로컬 클론이 필요하며, server가 처음 실행될 때 자동으로 클론할 수 있습니다. 주요 도구로는 심각도, 생태계 또는 CVE 식별자로 필터링 검색을 수행하는 list_advisories와 특정 GHSA ID에 대한 상세 정보를 가져오는 get_advisory가 있습니다. 이러한 로컬 우선 방식은 로컬 저장소 데이터 소스에서 제공하는 도구를 사용하여 보안 트리아지를 효율적으로 수행할 수 있도록 보장합니다.
활용 사례
- 1생태계 취약점 찾기특정 패키지와 관련된 심각도가 높은 npm advisory를 검색합니다.
- 2특정 advisory 상세 정보 가져오기고유 식별자를 사용하여 단일 보안 advisory에 대한 포괄적인 정보를 가져옵니다.
- 3심각도별 보안 위협 필터링특정 패키지 생태계 내의 모든 critical advisory 목록을 확인합니다.
- 4취약한 코드 경로 트리아지advisory 데이터와 코드 검색을 결합하여 코드베이스의 취약한 섹션을 찾아 수정합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
GitHub Advisory MCP 도구 12
README에서 감지됨ghsa_idcve_idecosystemseveritycwesis_withdrawnaffectspublishedupdatedper_pagedirectionsort
| ghsa_id | — | |
| cve_id | — | |
| ecosystem | — | |
| severity | — | |
| cwes | — | |
| is_withdrawn | — | |
| affects | — | |
| published | — | |
| updated | — | |
| per_page | — | |
| direction | — | |
| sort | — |
구성
ADVISORY_REPO_PATH
| 이름 | 설명 | 유형 |
|---|---|---|
| ADVISORY_REPO_PATH | — |
자동 검사
2026년 11월 13일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨통과
- 모델에 대한 숨겨진 지침 없음통과
- 패키지와 의존성에 심각한 보안 권고 없음검사되지 않음
README
GitHub에서 보기Microsoft GitHub Advisory MCP Server
MCP server for querying GitHub Security Advisories from a local cloned advisory database.
Architecture
Two-Tier Design:
┌─────────────────────────────────────┐
│ MCP Server (stdio or HTTP) │ Port: 18006 (HTTP mode)
│ - list_advisories tool │
│ - get_advisory tool │
└──────────┬──────────────────────────┘
│ calls internally
┌──────────▼──────────────────────────┐
│ Local Express REST API │ Port: 18005
│ GET /health │
│ GET /advisories │
│ GET /advisories/:ghsa_id │
│ GET /search?q=<query> │
└──────────┬──────────────────────────┘
│ reads from
┌──────────▼──────────────────────────┐
│ LocalRepositoryDataSource │
│ Reads JSON files from: │
│ external/advisory-database/ │
└─────────────────────────────────────┘
Quick Start (VS Code + GitHub Copilot)
For users who just want to use the MCP server in VS Code:
- Clone and Setup:
git clone https://github.com/microsoft/github-advisory-mcp.git
cd github-advisory-mcp
npm install
npm run build
- The
.vscode/mcp.jsonis pre-configured:
{
"servers": {
"advisory": {
"command": "node",
"args": ["${workspaceFolder}/dist/index.js"],
"type": "stdio",
"env": {
"ADVISORY_REPO_PATH": "${workspaceFolder}/external/advisory-database"
}
}
}
}
-
Reload VS Code - Copilot will automatically:
- Clone the advisory database (~370K advisory files; ~35K github-reviewed served) on first use
- Enable MCP tools:
list_advisories,get_advisory
-
Test in Copilot Chat:
@workspace Find high-severity npm advisories related to express
Done! The MCP server runs automatically when Copilot needs it.
Setup (Advanced)
1. Install Dependencies
npm install
npm run build
2. Database Setup (Optional - Auto-clones on first use)
# Linux/Mac (manual pre-clone)
./scripts/setup-advisory-database.sh
# Windows (manual pre-clone)
git clone --depth=1 https://github.com/github/advisory-database.git external/advisory-database
The database will auto-clone on first MCP tool call if not present.
Usage
Start Server (HTTP Streaming Mode)
Windows:
.\Start.ps1
# or with custom ports:
.\Start.ps1 -McpPort 18006 -ApiPort 18005
Manual Start:
$env:ADVISORY_REPO_PATH = "C:\path\to\advisory-database"
$env:MCP_PORT = "18006"
$env:ADVISORY_API_PORT = "18005"
node dist\http-server.js
Start Server (stdio Mode)
ADVISORY_REPO_PATH=/path/to/advisory-database node dist/index.js
Guides
- Correlating advisories with code — use the advisory server together with a code-search MCP to locate and triage vulnerable code paths.
Testing
Quick Test (Copilot Chat)
After setup, test in VS Code Copilot Chat:
@workspace /tests What tools does the advisory MCP server provide?
Or query advisories directly:
@workspace Find critical npm advisories from 2024
@workspace Get details for GHSA-jc85-fpwf-qm7x
Automated Tests
npx vitest run test/unit # fast, hermetic unit tests (this is what `npm test` runs)
npm run test:e2e # end-to-end MCP tests (needs the advisory database)
Health Checks
# MCP Server Health
Invoke-RestMethod http://localhost:18006/health
# Local API Health
Invoke-RestMethod http://localhost:18005/health
Test the REST API and MCP protocol directly
Low-level REST and raw MCP JSON-RPC request recipes (health checks, session
initialize, tools/list, tools/call) live in docs/http-api.md.
Environment Variables
| Variable | Default | Description |
|---|---|---|
ADVISORY_REPO_PATH |
./external/advisory-database |
Path to cloned advisory-database repository |
MCP_PORT |
18006 |
Port for MCP HTTP server |
ADVISORY_API_PORT |
18005 |
Port for local REST API |
ADVISORY_API_HOST |
127.0.0.1 |
Host for local REST API |
ADVISORY_API_BASE |
http://localhost:18005 |
Base URL for MCP tools to call local API |
MCP Tools
list_advisories
List security advisories with optional filters.
Parameters:
ghsa_id(string): GHSA identifiercve_id(string): CVE identifierecosystem(enum): Package ecosystem (npm, pip, maven, etc.)severity(enum): Severity level (low, medium, high, critical, unknown)cwes(string): Comma-separated CWE identifiersis_withdrawn(boolean): Filter withdrawn advisoriesaffects(string): Package name filterpublished(string): Published date filterupdated(string): Updated date filterper_page(number): Results per page (max 100)direction(enum): Sort direction (asc, desc)sort(enum): Sort field (updated, published)
Example:
{
"ecosystem": "npm",
"severity": "critical",
"per_page": 10
}
get_advisory
Get detailed information about a specific advisory.
Parameters:
ghsa_id(string, required): GHSA identifier (e.g., GHSA-xxxx-xxxx-xxxx)
Example:
{
"ghsa_id": "GHSA-jc85-fpwf-qm7x"
}
Security & Validation
Input Validation
All MCP tool parameters are validated using Zod schemas:
list_advisories validation:
ecosystem: Enum of valid ecosystems (npm, pip, maven, etc.) - prevents injectionseverity: Enum (low, medium, high, critical, unknown) - prevents injectionper_page: Number constrained to 1-100 max - prevents resource exhaustioncwes: String pattern matching for CWE identifiers - validates format- Date filters: ISO 8601 format validation
get_advisory validation:
ghsa_id: Pattern matchGHSA-xxxx-xxxx-xxxx- prevents path traversal- Required field enforcement - rejects empty/null values
File System Protection:
- Path validation: Script execution paths validated against known safe scripts
- No user-supplied paths accepted - prevents directory traversal
- Read-only database access - no write operations exposed
Rate Limiting
Current: No rate limiting (stdio transport = single local user)
Considerations:
- stdio mode: Single-process, single-user - no rate limiting needed
- HTTP mode: Consider adding rate limiting if exposed beyond localhost
- Database queries: Inherently rate-limited by disk I/O (hundreds of thousands of files)
Future (HTTP mode): add rate limiting if you expose the server beyond localhost — see docs/integration.md.
Session Security
- Timeout: 30-minute automatic session cleanup
- Isolation: Each MCP session isolated (no shared state)
- Transport: stdio (local) or HTTP (localhost-only by default)
Known Security Measures
✅ Path validation for script execution (prevents command injection)
✅ Zod schema validation (prevents type confusion attacks)
✅ Session timeout (prevents resource leaks)
✅ Read-only database access (no write exposure)
✅ Enum validation for critical parameters (prevents injection)
⚠️ No rate limiting (stdio mode = trusted local user)
⚠️ No authentication (stdio mode = local process trust model)
Integration with Orchestrator
The stdio MCP server can be driven from any MCP client. A Python client example and an HTTP rate-limiting snippet are in docs/integration.md.
Port Allocation
- 18005: Local REST API (Express server)
- 18006: MCP HTTP streaming endpoint
Troubleshooting
Database Clone Failures
Issue: git clone fails for advisory-database
fatal: unable to access 'https://github.com/github/advisory-database.git/': Could not resolve host
Solutions:
- Check network connectivity:
ping github.com - Use VPN if behind corporate firewall
- Pre-download database:
git clone --depth=1 https://github.com/github/advisory-database.git external/advisory-database - Point to existing database:
export ADVISORY_REPO_PATH=/path/to/existing/advisory-database
Timing: Initial clone takes 2-5 minutes (hundreds of thousands of files)
Server Won't Start
Issue: Error: EADDRINUSE: address already in use
Solution:
# Check what's using the port
lsof -i :18005 # Local API
lsof -i :18006 # MCP server
# Kill process
kill -9 <PID>
Windows-Specific Issues
Issue: Bash script fails on Windows
./scripts/setup-advisory-database.sh
# bash: ./scripts/setup-advisory-database.sh: No such file or directory
Solution: Use Git Bash or WSL, or manual clone:
git clone --depth=1 https://github.com/github/advisory-database.git external/advisory-database
MCP Tools Not Available in Copilot
Issue: Copilot doesn't see advisory MCP tools
Solution:
- Verify
.vscode/mcp.jsonexists in workspace root - Reload VS Code:
Ctrl+Shift+P→ "Developer: Reload Window" - Check build:
npm run buildand verifydist/index.jsexists - Check Copilot logs:
Ctrl+Shift+P→ "Developer: Open Logs Folder"
Query Performance Issues
Symptom: Slow advisory queries (>5 seconds)
Solutions:
- First query always slower (loads database index into memory)
- Use
per_pageparameter to limit results:per_page: 10 - Filter by ecosystem to reduce search space:
ecosystem: "npm" - Check disk I/O: the advisory database is hundreds of thousands of files
Performance Benchmarks:
- First query (cold start): builds the in-memory index (slower)
- Subsequent queries: fast (index cached in memory)
- Database size: ~370K advisory JSON files (~35K github-reviewed served by default)
Database Update Strategy
Automated Updates:
The advisory database auto-updates on server start via git pull in setup script.
Manual Update:
cd external/advisory-database
git pull origin main
Update Frequency: GitHub updates advisory-database multiple times daily
Known Issues
Windows
- The bash script
setup-advisory-database.shdoesn't work on Windows - Workaround: Manually clone database or use existing one via
ADVISORY_REPO_PATH - Use
Start.ps1script for convenient startup
Database Size
- The advisory-database is ~370K advisory JSON files (~35K github-reviewed)
- Shallow clone (
--depth=1) recommended - First query loads entire index into memory (lazy loading)
- Subsequent queries are fast (cached)
Development
CI/CD Pipeline
GitHub Actions Workflows:
-
Build and Test (
.github/workflows/build.yml)- Triggers: Push to
main, PRs tomain - Matrix: Node.js 20.x, 22.x on Ubuntu latest
- Steps: Checkout → Setup Node →
npm ci→ build → verify artifacts → unit tests with coverage. End-to-end tests run on themainbranch.
- Triggers: Push to
-
Copilot PR Review (
.github/workflows/copilot-review.yml)- Triggers: PR opened or synchronized
- Action: Automatically requests Copilot code review
- Permissions: pull-requests: write, contents: read
Watch Mode:
npm run dev
Clean Build:
npm run clean
npm run build
File Structure:
services/mcp/advisory/
├── src/
│ ├── index.ts # stdio entry point
│ ├── http-server.ts # HTTP streaming server
│ ├── server.ts # MCP server factory
│ ├── local-server.ts # Express REST API
│ ├── datasources/
│ │ └── local-repository.ts # LocalRepositoryDataSource
│ ├── tools/
│ │ └── advisories.ts # MCP tools (list/get)
│ └── types/
│ └── data-source.ts # TypeScript interfaces
├── dist/ # Compiled JavaScript
├── external/
│ └── advisory-database/ # Git submodule (cloned)
├── scripts/
│ └── setup-advisory-database.sh
├── package.json
├── tsconfig.json
├── Start.ps1 # Windows startup script
└── README.md
Testing Status
✅ Working:
- TypeScript compilation
- HTTP server startup (port 18006)
- Local REST API (port 18005)
- Health endpoints
- Advisory listing with filters
- Getting specific advisory by GHSA ID
- Ecosystem filtering (npm, pip, etc.)
- Pagination
⏳ Not Yet Tested:
- MCP tool calls (list_advisories, get_advisory)
- Session management
- stdio mode
- Multiple concurrent sessions
- Search functionality
Contributing
This project does not accept external contributions (pull requests) at this time. Only verified committers from the Microsoft GitHub organization may contribute code.
If you would like to get involved:
- Report bugs or request features by opening an issue
- Reach out to the maintainers at opencode@microsoft.com
See CONTRIBUTING.md for details.
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
GitHub Advisory MCP 질문
GitHub Advisory MCP는 어떤 도구를 제공하나요?
12개 도구를 제공합니다. 예: ghsa_id, cve_id, ecosystem, severity, cwes.
이 MCP server는 어떤 도구를 제공하나요?
이 server는 두 가지 주요 도구를 제공합니다. 필터를 사용하여 검색하는 list_advisories와 특정 GHSA ID에 대한 상세 정보를 가져오는 get_advisory입니다.
API key가 필요한가요?
아니요, 이 server는 stdio 또는 localhost 전용 HTTP를 사용하는 로컬 신뢰 모델로 작동하며 인증이 필요하지 않습니다.
advisory 데이터베이스를 어떻게 업데이트하나요?
데이터베이스는 server 시작 시 git pull을 통해 자동으로 업데이트되거나, advisory-database 디렉토리 내부에서 수동으로 git pull을 실행하여 업데이트할 수 있습니다.