code-audit-mcp
Code Audit MCP Server
大規模言語モデル(LLM)とモデルコンテキストプロトコル(MCP)に基づく自動コード監査ツール。
機能特性
コードセマンティクス解析:AST解析、型推論、タイントマーキング
呼び出しチェーン追跡:ファイル/モジュールをまたぐデータフロー追跡
脆弱性検証:PoCを自動生成して検証を実行
多言語サポート:PHP、Python、Java、JavaScript/TypeScript
Related MCP server: Code Audit MCP Server
クイックスタート
環境要件
Node.js >= 18.0
TypeScript >= 5.0
Cursor / Windsurf(MCP対応IDE)
インストール
git clone https://github.com/kkk1259/code-audit-mcp.git
cd code-audit-mcp
npm install
npm run build設定
CursorでMCP Serverを設定します:
// .cursor/mcp.json
{
"mcpServers": {
"code-audit": {
"command": "node",
"args": ["./dist/server.js"],
"env": {
"PROJECT_ROOT": "/path/to/your/project"
}
}
}
}使用例
SQLインジェクション監査
用户: 请审计这个项目的SQL注入漏洞
AI: 我将使用MCP工具进行系统性审计。
首先,识别所有用户输入源和SQL执行点...逆シリアライゼーション脆弱性の探索
用户: 检查是否存在反序列化漏洞
AI: 我将分析项目中的unserialize调用,并追踪POP链...ツールリスト
ツール名 | 機能 | パラメータ |
| ソースコードのAST解析 |
|
| 関数呼び出し元を検索 |
|
| データフローを追跡 |
|
| 脆弱性PoCを生成 |
|
プロジェクト構造
code-audit-mcp/
├── src/
│ ├── server.ts # MCP Server入口
│ ├── tools/
│ │ ├── parser.ts # AST解析
│ │ ├── callgraph.ts # 调用链追踪
│ │ ├── verifier.ts # 漏洞验证
│ │ └── poc.ts # PoC生成
│ ├── rules/
│ │ ├── php.json # PHP安全规则
│ │ ├── python.json # Python安全规则
│ │ └── java.json # Java安全规则
│ └── utils/
│ ├── taint.ts # 污点分析
│ └── sanitizer.ts # 过滤函数识别
├── prompts/
│ ├── audit-system.md # 系统Prompt
│ └── vuln-types/ # 各漏洞类型Prompt
├── tests/
├── package.json
└── README.mdベストプラクティス
✅ やるべきこと
モジュール単位で監査し、プロジェクト全体を一度に投入しない
まず静的ツールで疑わしい箇所を取得し、その後AIで深く分析する
各脆弱性タイプに専用のPromptを準備する
監査前にAIにプロジェクト構造(エントリ、ルート、データベース)を理解させる
AIレポートを人手でレビューする、特に「高リスク」の指摘
監査履歴を保存し、Promptの反復改善に使用する
❌ やってはいけないこと
AIレポートを盲信しない(誤検出は避けられない)
Promptに複雑すぎる監査ロジックを記述しない
脆弱性検証ステップを省略しない
機密プロジェクトでクラウドAPIを使用しない(ローカルモデルを使う)
ビジネスロジックの脆弱性を無視しない(AIはこれに弱い)
効果の期待値
脆弱性タイプ | 再現率 | 適合率 |
インジェクション系脆弱性 | 80%+ | 75%+ |
逆シリアライゼーション | POPチェーン発見能力は人手を超える | - |
ロジック脆弱性 | 依然として人工監査が主体 | - |
全体の効率:3〜5倍の向上(人手レビュー時間を含む)
オープンソースライセンス
MIT License
関連記事
コントリビューション
IssueとPRの提出を歓迎します!
お問い合わせ
GitHub: kkk1259
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered Java source code vulnerability auditing through function-level taint analysis. Performs reverse tracking from dangerous functions to external entry points to automatically discover potential security vulnerability chains.115
- AlicenseBqualityCmaintenanceAn AI-native code security audit MCP server that supports multi-language AST analysis, call graph analysis, vulnerability detection, and AI deep audit.71MIT
- AlicenseNot gradedqualityDmaintenanceMulti-language SAST and AI-powered fuzzing MCP server for Claude Code integration, enabling static and dynamic security analysis of code.MIT
- FlicenseNot gradedqualityCmaintenanceA high-precision logical vulnerability auditing tool that uses MCP and CodeGraph for automated 0-day discovery and verification in multi-language codebases.
Related MCP Connectors
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for static security analysis of Android source code
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kkk1259/code-audit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server