Android Security Analyzer
Android Security Analyzer
Android 애플리케이션 소스 코드의 정적 보안 분석을 위한 MCP 서버입니다. Cloudflare Workers에서 Streamable HTTP를 통한 원격 MCP 서버로 실행됩니다.
기능
Android 프로젝트 소스 파일을 분석하여 — 프로젝트를 빌드하지 않고 — 구조화된 보안 보고서를 반환합니다. 분석 범위는 다음과 같습니다:
매니페스트 분석 — 내보낸 구성 요소, 위험한 권한, 평문 트래픽, 디버그 플래그, 백업 설정, SDK 버전
Gradle/빌드 구성 — 릴리스 빌드 잘못된 구성, 오래된 SDK, 의심스러운 종속성, 하드코딩된 시크릿
소스 코드 (Java/Kotlin) — 안전하지 않은 WebView, SSL/TLS 우회, 취약한 암호화, SQL 인젝션 패턴, 프로세스 실행, 안전하지 않은 파일 저장, PendingIntent 문제
XML 구성 — 네트워크 보안 구성 취약점, 과도하게 넓은 파일 제공자 경로
시크릿 스캐닝 — API 키, 토큰, 비밀번호, 개인 키, 클라우드 자격 증명, 고엔트로피 문자열
모든 분석은 정규식/패턴 기반이며 외부 도구, Java 또는 Android SDK 없이 Workers 런타임에서 기본적으로 실행됩니다.
Related MCP server: APK Security Guard MCP Suite
아키텍처
POST /mcp ──► McpServer (JSON-RPC 2.0) ──► Tool Router
│
┌───────────────────────────────┘
▼
Orchestrator
│
┌─────────┼─────────┬─────────────┬──────────────┐
▼ ▼ ▼ ▼ ▼
Manifest Gradle Source Code XML Config Secret
Analyzer Analyzer Analyzer Analyzer Scanner
│ │ │ │ │
└─────────┴─────────┴─────────────┴──────────────┘
│
▼
Scoring + Deduplication ──► AnalysisReport주요 설계 결정:
무상태 — 세션 없음, Durable Objects 없음
최소의 MCP JSON-RPC 2.0 구현 (무거운 SDK 종속성 없음)
확장 가능한 규칙 레지스트리를 갖춘 데이터 기반 규칙 엔진
통일된 Finding 유형을 갖춘 독립적인 분석기
fast-xml-parser를 통한 경량 XML 파싱zod를 통한 입력 검증번들 크기: ~66KB gzip 압축
MCP 도구
도구 | 설명 |
| 프로젝트 파일의 전체 보안 분석 |
| 구현된 모든 보안 규칙 나열 |
| 특정 규칙에 대한 상세 설명 |
| 서버 상태 및 규칙 엔진 통계 |
설치
호스팅 서버 (Cline / MCP 클라이언트 권장): 로컬 설치가 필요 없습니다. 서버는 다음에서 실행됩니다:
https://android-security-analyzer.ako-labs.workers.dev/mcp
이 URL을 MCP 클라이언트 구성에 추가하세요 (아래 MCP 클라이언트에서 연결 참조).
로컬 개발:
npm install개발
npm run dev이렇게 하면 로컬 Wrangler 개발 서버가 시작됩니다. MCP 엔드포인트는 http://localhost:8787/mcp에서 사용할 수 있습니다.
배포
npm run deployCloudflare Workers에 배포합니다. wrangler 인증이 필요합니다 (npx wrangler login).
테스트
npm test # Run all tests
npm run test:watch # Watch mode
npm run typecheck # TypeScript type checking로컬 MCP 테스트
연결 초기화
Unix:
curl -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'Windows (PowerShell):
(Invoke-WebRequest -Method Post -Uri "http://localhost:8787/mcp" -ContentType "application/json" -Body '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' -UseBasicParsing).Content사용 가능한 도구 나열
Unix:
curl -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'Windows (PowerShell): 응답은 result.tools에 있습니다. 목록을 JSON으로 보려면 원시 응답을 사용하세요:
(Invoke-WebRequest -Method Post -Uri "http://localhost:8787/mcp" -ContentType "application/json" -Body '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' -UseBasicParsing).Content또는 객체를 통해: (Invoke-RestMethod ...).result.tools | ConvertTo-Json -Depth 5
상태 확인
Unix:
curl -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"health","arguments":{}}}'Windows (PowerShell):
(Invoke-WebRequest -Method Post -Uri "http://localhost:8787/mcp" -ContentType "application/json" -Body '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"health","arguments":{}}}' -UseBasicParsing).Content분석 실행 (최소 예제)
Unix:
curl -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "analyze_android_project",
"arguments": {
"projectName": "TestApp",
"files": [
{
"path": "app/src/main/AndroidManifest.xml",
"content": "<manifest><application android:debuggable=\"true\" android:allowBackup=\"true\"></application></manifest>"
}
]
}
}
}'Windows (PowerShell):
$body = @{
jsonrpc = "2.0"
id = 4
method = "tools/call"
params = @{
name = "analyze_android_project"
arguments = @{
projectName = "TestApp"
files = @(
@{
path = "app/src/main/AndroidManifest.xml"
content = "<manifest><application android:debuggable=`"true`" android:allowBackup=`"true`"></application></manifest>"
}
)
}
}
} | ConvertTo-Json -Depth 10
(Invoke-WebRequest -Method Post -Uri "http://localhost:8787/mcp" -ContentType "application/json" -Body $body -UseBasicParsing).ContentMCP 클라이언트에서 연결
MCP 클라이언트 구성에 추가하세요:
{
"mcpServers": {
"android-security-analyzer": {
"url": "http://localhost:8787/mcp"
}
}
}프로덕션(호스팅)의 경우:
{
"mcpServers": {
"android-security-analyzer": {
"url": "https://android-security-analyzer.ako-labs.workers.dev/mcp"
}
}
}보안 규칙
분석기는 5개 카테고리에 걸쳐 53개의 보안 규칙을 구현합니다:
카테고리 | 접두사 | 규칙 수 | 예시 |
매니페스트 | MAN-* | 17 | 디버그 가능, allowBackup, 내보낸 구성 요소, 권한 |
Gradle | GRD-* | 9 | 릴리스 구성, SDK 버전, 종속성, 시크릿 |
소스 | SRC-* | 17 | WebView, SSL/TLS, 암호화, 인젝션, 파일 저장 |
XML 구성 | XML-* | 4 | 네트워크 보안 구성, 파일 제공자 경로 |
시크릿 | SEC-* | 7 | API 키, 토큰, 비밀번호, 클라우드 자격 증명 |
각 발견 항목에는 다음이 포함됩니다:
안정적인 규칙 ID
심각도 (critical/high/medium/low/info) 및 신뢰도 (high/medium/low)
파일 경로 및 줄 번호 (확인 가능한 경우)
증거 스니펫
CWE 및 OWASP Mobile Top 10 매핑
실행 가능한 권장 사항
점수 산정
위험 점수(0-100)는 발견 항목의 심각도에서 계산됩니다:
Critical: 9점
High: 6점
Medium: 3점
Low: 1점
Info: 0점
원시 합계는 예상 최대 50점을 기준으로 정규화됩니다.
제한 사항
SAST 대체 아님 — 패턴/정규식 기반 휴리스틱이며, 전체 AST/데이터 흐름 분석이 아님
빌드 불필요 — 원시 소스를 분석하므로 빌드 시 변환이 보이지 않음
오탐 가능 — 특히 시크릿 스캐닝 및 일부 코드 패턴에서
Workers 제약 — 128MB 메모리 제한, CPU 시간 제한, 파일시스템 접근 불가
APK/AAB 분석 없음 — 소스 코드만
절차 간 분석 없음 — 패턴은 호출 그래프가 아닌 파일별로 일치
프로젝트 구조
src/
├── index.ts # Worker entry point
├── server/
│ ├── mcp.ts # MCP JSON-RPC 2.0 handler
│ └── tools/ # MCP tool implementations
│ ├── analyzeAndroidProject.ts
│ ├── listAndroidSecurityChecks.ts
│ ├── explainFinding.ts
│ └── health.ts
├── core/
│ ├── types.ts # TypeScript types & Zod schemas
│ ├── scoring.ts # Risk score computation
│ ├── registry.ts # Rule registry
│ └── orchestrator.ts # Analysis orchestrator
├── analyzers/
│ ├── manifestAnalyzer.ts
│ ├── gradleAnalyzer.ts
│ ├── sourceAnalyzer.ts
│ ├── xmlConfigAnalyzer.ts
│ └── secretScanner.ts
├── parsers/
│ ├── xml.ts # XML parser wrapper
│ ├── gradle.ts # Gradle file parser
│ ├── source.ts # Source code pattern matcher
│ └── files.ts # File classifier
├── rules/
│ ├── manifestRules.ts
│ ├── gradleRules.ts
│ ├── sourceRules.ts
│ ├── xmlRules.ts
│ └── secretRules.ts
├── mappings/
│ ├── cwe.ts # CWE descriptions
│ └── owaspMobile.ts # OWASP Mobile Top 10
└── utils/
├── lines.ts # Line number utilities
├── paths.ts # Path classification
└── text.ts # Text utilities
test/
├── fixtures/ # Sample Android project files
├── unit/ # Unit tests per module
└── integration/ # Full analysis integration tests새 규칙 추가
src/rules/아래의 해당 파일에 규칙을 정의합니다.src/analyzers/아래의 해당 분석기에 감지 로직을 추가합니다.필요한 경우
src/mappings/cwe.ts에 CWE 매핑을 추가합니다.테스트 케이스를 추가합니다.
규칙은
src/core/registry.ts를 통해 자동으로 등록됩니다.
라이선스
MIT
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 gradedqualityDmaintenanceProvides a one-stop automated solution for Android APK security analysis by integrating tools like JEB, JADX, APKTOOL, FlowDroid, and MobSF into unified MCP standard API interfaces.11
- FlicenseNot gradedqualityDmaintenanceIntegrates multiple Android APK security analysis tools into MCP standard APIs for automated static and dynamic analysis and vulnerability detection.
- AlicenseAqualityCmaintenanceMCP server for Android APK triage, providing tools to parse APK headers, list DEX classes, and decode AndroidManifest.xml using apktool or androguard backends.51MIT
- AlicenseNot gradedqualityBmaintenanceLocal static-analysis assistant for Android malware research that manages investigation cases, exposes MCP tools via a local server, and persists evidence-backed findings without cloud dependency.MIT
Related MCP Connectors
MCP server for ScanMalware.com URL scanning, malware detection, and analysis.
MCP server for Appcircle mobile CI/CD platform.
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
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/ako2345/android-security-analyzer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server