LLM 및 AI 통합 과정에서 발생하는 프롬프트 인젝션, 데이터 개인정보 유출, 안전하지 않은 출력 처리와 같은 보안 취약점을 코드베이스에서 스캔합니다.
다른 이름 GuardBee/guardbee-mcp, @guardbee/mcp-ai-code-scanner
- 스타
- 2
- Tools
- 4
- 다운로드, 30일
- 1,842
- 최신 버전
- 0.3.2
- 마지막 커밋
- 2026년 11월 12일
- 라이선스
- MIT
ai-code-scanner MCP란?
ai-code-scanner은(는) MCP server입니다. LLM 및 AI 통합 과정에서 발생하는 프롬프트 인젝션, 데이터 개인정보 유출, 안전하지 않은 출력 처리와 같은 보안 취약점을 코드베이스에서 스캔합니다. 4개 도구를 제공합니다. 예: scan_text, scan_file, scan_directory.
프로젝트 README에서 생성된 요약
ai-code-scanner MCP server 정보
특정 취약점 패턴을 기준으로 코드베이스를 스캔하여 AI 통합 보안을 강화하는 것이 이 MCP server의 주요 기능입니다. 일반적인 시크릿 스캐너가 놓치기 쉬운 프롬프트 인젝션, 데이터 개인정보 유출, 안전하지 않은 출력 처리와 같은 위험을 개발자가 식별할 수 있도록 지원합니다. 이 도구는 모델 출력에 대한 신뢰 수준과 에이전트가 호출할 수 있는 도구에 부여된 권한 수준에 집중합니다.
사용자는 Claude Desktop을 통해 로컬에서 이 서버를 실행하거나, CI/CD 통합을 위해 CLI를 통해 실행할 수 있습니다. 코드 스니펫을 위한 scan_text, 개별 파일을 위한 scan_file, 재귀적 코드베이스 분석을 위한 scan_directory와 같은 특정 도구를 제공합니다. 또한 지원되는 모든 탐지 카테고리를 확인할 수 있는 list_patterns 도구도 포함되어 있습니다.
이 스캐너는 guardbee.yml 설정 파일과 JSON 파일을 이용한 커스텀 규칙 팩 추가 기능을 통해 높은 수준의 커스터마이징이 가능합니다. 이를 통해 팀은 민감한 데이터나 내부 도구에 대한 조직별 패턴을 정의할 수 있습니다. 탐지 결과는 구체적인 권장 사항과 함께 보고되며, GitHub Code Scanning에서 사용할 수 있도록 SARIF 2.1.0 형식으로 내보낼 수 있습니다.
활용 사례
- 1프롬프트 인젝션 위험 탐지사용자 입력이 시스템 프롬프트에 안전하지 않은 방식으로 혼합되고 있는지 AI에게 확인하도록 요청합니다.
- 2민감 데이터 유출 방지이메일과 같은 개인 식별 정보가 LLM으로 직접 전송되지 않도록 코드베이스를 스캔합니다.
- 3에이전트 도구 권한 감사AI 에이전트가 사용할 수 있는 도구 중 쉘 실행과 같이 과도한 제어 권한을 가진 도구가 있는지 확인합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
ai-code-scanner MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 ai-code-scanner MCP 설치
$ claude mcp add ai-code-scanner -- npx -y @guardbee/mcp-ai-code-scannerCursor에 ai-code-scanner MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"ai-code-scanner": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-ai-code-scanner"
]
}
}
}VS Code에 ai-code-scanner MCP 설치
.vscode/mcp.json
{
"servers": {
"ai-code-scanner": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-ai-code-scanner"
]
}
}
}VS Code CLI에 ai-code-scanner MCP 설치
$ code --add-mcp '{"name":"ai-code-scanner","type":"stdio","command":"npx","args":["-y","@guardbee/mcp-ai-code-scanner"]}'Claude Desktop에 ai-code-scanner MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"ai-code-scanner": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-ai-code-scanner"
]
}
}
}Codex에 ai-code-scanner MCP 설치
$ codex mcp add ai-code-scanner -- npx -y @guardbee/mcp-ai-code-scannerCodex config.toml에 ai-code-scanner MCP 설치
~/.codex/config.toml
[mcp_servers.ai-code-scanner] command = "npx" args = ["-y", "@guardbee/mcp-ai-code-scanner"]
Gemini CLI에 ai-code-scanner MCP 설치
$ gemini mcp add -s user ai-code-scanner npx -- -y @guardbee/mcp-ai-code-scannerGemini settings.json에 ai-code-scanner MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"ai-code-scanner": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-ai-code-scanner"
]
}
}
}ai-code-scanner MCP 도구 4
README에서 감지됨scan_textscan_filescan_directorylist_patterns
| scan_text | — | |
| scan_file | — | |
| scan_directory | — | |
| list_patterns | — |
자동 검사
2026년 11월 13일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨통과
- 모델에 대한 숨겨진 지침 없음통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음통과
README
GitHub에서 보기@guardbee/mcp-ai-code-scanner
🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch
An MCP (Model Context Protocol) server that scans your codebase for security patterns commonly found in LLM/AI integrations.
While secret-scanner looks for leaked secrets/API keys, this package looks for patterns: how much a model's output is trusted, how privileged the tools it can call are, what data is sent to a third-party LLM — risks that a static credential scan can't catch.
Telemetry is off by default. With
GUARDBEE_TELEMETRY=1it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields likecontent,tokenorpasswordare replaced with a placeholder. See@guardbee/mcp-telemetry.
Claude ──► ai-code-scanner ──► Your codebase
│
├─ Client-exposure (dangerouslyAllowBrowser: true)
├─ Output handling (eval(llmOutput), unvalidated JSON.parse)
├─ Excessive agency (an agent tool named execute_command)
├─ Data privacy (email/national ID interpolated directly into a prompt)
└─ Prompt injection (raw request data mixed into a system prompt)
Features
- 10 patterns, 5 categories — client-exposure, output-handling, excessive-agency, data-privacy, prompt-injection
- Every finding includes why it's risky and what to do about it (
recommendation) — not just "found it" - SARIF 2.1.0 output — CI/CD integration (GitHub Code Scanning, etc.)
- Config file support via
guardbee.yml - Custom rule packs — extend detection with org-specific patterns (KVKK/GDPR field names, internal tool names) via JSON files, no fork required
- 36 unit tests — a positive and a negative (false-positive) scenario for every built-in pattern, plus custom-rule loading/validation
Quick Start
Claude Desktop / MCP Client
{
"mcpServers": {
"guardbee-ai-code-scanner": {
"command": "npx",
"args": ["-y", "@guardbee/mcp-ai-code-scanner"]
}
}
}
CLI (CI/CD)
npx @guardbee/mcp-ai-code-scanner scan ./src --fail-on=high --format=sarif > results.sarif
MCP Tools
| Tool | Description |
|---|---|
scan_text |
Scans a given text/code snippet |
scan_file |
Scans a single file |
scan_directory |
Recursively scans a directory (node_modules, .git, dist skipped automatically) |
list_patterns |
Lists all supported patterns by category |
Detected Patterns
| Category | Pattern | Severity | What it means |
|---|---|---|---|
| client-exposure | openai_dangerously_allow_browser |
critical | OpenAI key leaked to the browser |
| client-exposure | client_bundled_ai_api_key |
critical | An AI key enters the client bundle via NEXT_PUBLIC_/VITE_/REACT_APP_ |
| output-handling | eval_llm_output |
critical | Model output executed as code via eval()/Function() |
| output-handling | exec_llm_output |
critical | Model output passed to a shell command (command injection) |
| output-handling | llm_output_dangerously_set_inner_html |
high | Model output rendered as raw HTML (XSS) |
| output-handling | llm_json_no_validation |
medium | Model output JSON.parse'd without schema validation |
| excessive-agency | excessive_agency_tool_name |
high | A tool that grants an agent shell/code execution |
| excessive-agency | unbounded_agent_loop |
medium | An agent loop with no iteration bound (cost/DoS) |
| data-privacy | pii_field_in_llm_prompt |
high | Data like email/national ID/card number goes directly into a prompt |
| prompt-injection | unsanitized_input_in_system_prompt |
medium | Raw request/user data mixed into a system prompt |
These are heuristic findings — a static text-pattern scan, not a full AST analysis. Designed for a low false-positive rate, but every finding should still be reviewed manually.
Configuration (guardbee.yml)
ai-code-scanner:
fail-on: high # any | critical | high | medium | low | none
max-files: 5000
rules-dir: .guardbee/rules # custom rule packs, see below
exclude:
- ".test.ts"
- "fixtures/"
Custom rules
Built-in patterns cover common AI/LLM integration mistakes, but field names and
internal conventions (e.g. which prop names carry KVKK-regulated data) are
project-specific. Drop one or more JSON files into .guardbee/rules/
(configurable via rules-dir) and they're merged with the built-ins at scan
time — for both the CLI and the MCP server (list_patterns marks them (custom)).
A file holds a single rule object or an array of them:
{
"id": "kvkk_musteri_tc_no",
"name": "musteriTcNo interpolated into a prompt",
"category": "data-privacy",
"pattern": "musteriTcNo",
"flags": "gi",
"severity": "high",
"recommendation": "Mask the national ID before it enters the prompt."
}
category is one of client-exposure | output-handling | excessive-agency | data-privacy | prompt-injection | cost-control; severity is one of
critical | high | medium | low. pattern is a JS regex source string
(flags defaults to "g"). A rule id that collides with a built-in or
another custom rule is rejected — the scanner keeps running but reports the
problem on stderr and skips that entry.
Development
npm run build
npm test # 36 unit tests
License
MIT — GuardBee
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.
ai-code-scanner MCP 질문
ai-code-scanner MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add ai-code-scanner -- npx -y @guardbee/mcp-ai-code-scanner를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
ai-code-scanner MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
ai-code-scanner MCP는 어떤 도구를 제공하나요?
4개 도구를 제공합니다. 예: scan_text, scan_file, scan_directory, list_patterns.
어떤 종류의 보안 위험을 탐지하나요?
클라이언트 측 API 키 노출, 모델 출력의 안전하지 않은 실행, 과도한 에이전트 권한, 프롬프트 내 PII(개인정보), 프롬프트 인젝션 등의 패턴을 식별합니다.
전체 AST 분석을 수행하나요?
아니요, 전체 AST 분석 대신 휴리스틱 정적 텍스트 패턴 스캐닝 방식을 사용합니다.
사용자 정의 보안 규칙을 추가할 수 있나요?
네, 커스텀 JSON 규칙 팩을 사용하여 조직별 패턴으로 탐지 범위를 확장할 수 있습니다.
텔레메트리가 기본적으로 활성화되어 있나요?
아니요, 텔레메트리는 기본적으로 비활성화되어 있습니다.