# ๐Ÿ›ก๏ธ SOC Command Center **A Next-Generation Security Operations Center deployed on [Cumin**](https://cumin.dev) ![Live Demo](https://img.shields.io/badge/Live%20Demo-Online-22c55e?style=for-the-badge&logo=googlechrome) ![Platform](https://img.shields.io/badge/Platform-Cumin%20Cloud-6366f1?style=for-the-badge) ![Runtime](https://img.shields.io/badge/Runtime-Node.js%2022-339933?style=for-the-badge&logo=nodedotjs) ![Protocol](https://img.shields.io/badge/API-MCP%20Protocol-818cf8?style=for-the-badge) *Built entirely by an AI agent using the Cumin MCP API โ€” a case study in AI-driven infrastructure deployment.* --- ## ๐Ÿ“Œ Overview This repository contains a fully deployed, production-grade **Security Operations Center (SOC)** platform built as a case study for evaluating the **Cumin cloud platform**. The entire system โ€” from architecture design to deployment โ€” was orchestrated by an AI agent using Cumin's native [Model Context Protocol (MCP)](https://modelcontextprotocol.io) API. **9 security services run as a single consolidated backend**, exposing a unified dashboard accessible publicly over HTTPS with zero manual infrastructure management. | | | | ----------------------- | -------------------------------------------------------------------------------------------------------- | | **Live URL** | [https://soc-gateway-http-e83c51cb.hosted.cumin.dev](https://soc-gateway-http-e83c51cb.hosted.cumin.dev) | | **Platform** | Cumin Cloud (`cumin.dev`) | | **Total Apps Deployed** | 2 (backend + gateway) | | **Services Simulated** | 9 SOC microservices | | **Real Data** | Live HTTP security header scanning | | **Full Report** | [`docs/REPORT.md`](./docs/REPORT.md) | --- ## ๐Ÿ—๏ธ Architecture ```mermaid flowchart TD subgraph Internet["๐ŸŒ Public Internet"] User["๐Ÿ‘ค User / Browser"] end subgraph Cumin["โ˜๏ธ Cumin Cloud"] subgraph Gateway["soc-gateway โ€” 150m CPU / 250MB"] GW["๐Ÿ“Š Dashboard UI\n/proxy/* โ†’ backend"] end subgraph Backend["soc-backend โ€” 250m CPU / 512MB"] subgraph Ingestion["๐Ÿ”ป Ingestion Layer"] FW["๐Ÿ”ฅ Firewall"] SIEM["๐Ÿ“‹ SIEM"] HP["๐Ÿฏ Honeypot"] end subgraph Analysis["๐Ÿ”ฌ Analysis Layer"] UBA["๐Ÿ‘ค UBA"] TI["๐ŸŒ Threat Intel"] IDS["๐Ÿ›ก๏ธ IDS/IPS"] end subgraph Operations["โš™๏ธ Operations Layer"] SOAR["โšก SOAR"] INC["๐Ÿšจ Incidents"] VULN["๐Ÿ” Vuln Scanner*"] end end end subgraph Targets["๐ŸŽฏ Live Scan Targets"] G["google.com"] GH["github.com"] CF["cloudflare.com"] end User -->|HTTPS| GW GW -->|HTTP Proxy| Backend VULN -.->|"Real HTTP Scans (every 60s)"| Targets ``` > **\*** Vuln Scanner fetches **REAL data** from `google.com`, `github.com`, `cloudflare.com` โ€” checking 7 security headers every 60 seconds. --- ## ๐Ÿ”’ Services | Service | Role | Data Type | | ------------------- | ------------------------------------------- | ---------- | | ๐Ÿ“‹ **SIEM** | Log collection & event correlation | Simulated | | โšก **SOAR** | Security orchestration & playbooks | Simulated | | ๐Ÿฏ **Honeypot** | Attacker deception & interaction tracking | Simulated | | ๐Ÿ›ก๏ธ **IDS/IPS** | Intrusion detection & blocking | Simulated | | ๐Ÿ”ฅ **Firewall** | Network traffic control & logging | Simulated | | ๐Ÿ‘ค **UBA** | User behavior analytics & anomaly detection | Simulated | | ๐ŸŒ **Threat Intel** | IOC feeds & threat intelligence | Simulated | | ๐Ÿ” **Vuln Scanner** | HTTP security header auditing | โœ… **Real** | | ๐Ÿšจ **Incidents** | Case management & incident response | Simulated | > **Note on Real Data:** The Vulnerability Scanner sends actual HTTP requests to public websites every 60 seconds and checks for the presence of 7 security headers (`CSP`, `HSTS`, `X-Frame-Options`, `X-Content-Type-Options`, `Referrer-Policy`, `Permissions-Policy`, `X-XSS-Protection`), computing a live compliance score. --- ## ๐Ÿš€ Deploy Your Own ### Prerequisites - Node.js 18+ - A [Cumin](https://cumin.dev) account with an API token and Project ID ### 1. Clone & Configure ```bash git clone https://github.com/ZiadMahmoud2003/cumin-soc.git cd cumin-soc ``` Edit `scripts/deploy.js` and update: ```javascript const CUMIN_TOKEN = "cumin_your_token_here"; const PROJECT_ID = "your-project-uuid"; ``` ### 2. Deploy ```bash node scripts/deploy.js ``` This will: 1. โœ… Delete any existing SOC apps in the project 2. โœ… Deploy `soc-backend` (all 9 services, real vulnerability scanning) 3. โœ… Wait for backend to boot and capture its public URL 4. โœ… Deploy `soc-gateway` (dashboard) pre-configured to proxy to the backend 5. โœ… Print the final live URLs **Expected output:** ``` โ•โ•โ• SOC PLATFORM DEPLOY โ•โ•โ• โœ… MCP connected ๐Ÿงน Cleaning old apps... ๐Ÿ“ฆ Deploying soc-backend... โœ… Backend ID: bbb0d30a-xxxx Backend: running โ†’ https://soc-backend-http-xxxxxxxx.hosted.cumin.dev ๐ŸŒ Deploying soc-gateway... โœ… Gateway ID: f32ce529-xxxx โ•โ•โ• FINAL STATUS โ•โ•โ• ๐ŸŸข soc-backend: running โ†’ https://soc-backend-http-xxxxxxxx.hosted.cumin.dev ๐ŸŸข soc-gateway: running โ†’ https://soc-gateway-http-xxxxxxxx.hosted.cumin.dev ``` ### 3. Cleanup ```bash node scripts/cleanup.js ``` --- ## ๐Ÿ”‘ How It Works: MCP Protocol The deployment uses Cumin's **Model Context Protocol (MCP)** API โ€” a JSON-RPC 2.0 interface designed for AI-agent consumption. ```javascript // 1. Initialize session const res = await fetch("https://api.cumin.dev/mcp", { method: "POST", headers: { "Authorization": `Bearer ${TOKEN}` }, body: JSON.stringify({ jsonrpc: "2.0", method: "initialize", id: 1, params: { protocolVersion: "2024-11-05", clientInfo: { name: "deployer" } } }) }); const SESSION_ID = res.headers.get("Mcp-Session-Id"); // 2. Deploy an app await fetch("https://api.cumin.dev/mcp", { method: "POST", headers: { "Authorization": `Bearer ${TOKEN}`, "Mcp-Session-Id": SESSION_ID }, body: JSON.stringify({ jsonrpc: "2.0", method: "tools/call", id: 2, params: { name: "create_app", arguments: { project_id: PROJECT_ID, name: "my-app", image: "node:22-alpine", cpu: 150, memory: 250, ports: [{ name: "http", number: 3000, health: { path: "/health" } }], args: ["node", "server.js"] } } }) }); ``` **Key trick โ€” Code Injection (no Docker build needed):** ```javascript // Base64-encode your app code and inject it as an env variable // This deploys in seconds with zero Docker infrastructure env: [{ name: "APP_CODE_B64", value: Buffer.from(code).toString("base64") }], args: ["sh", "-c", "echo $APP_CODE_B64 | base64 -d > /app.js && node /app.js"] ``` --- ## โšก Resource Requirements | Resource | Minimum (Free Tier) | This Project | | -------- | ------------------- | ------------ | | CPU | **150 millicores** | 400m total | | RAM | **250 MB** | 762MB total | | Apps | 10 max | 2 apps | > **Important:** Setting CPU < 150m or RAM < 250MB causes a permanent `pending` state. The Cumin scheduler will never allocate resources below the platform minimums. --- ## ๐Ÿ“ Repository Structure ``` cumin/ โ”œโ”€โ”€ ๐Ÿ“„ README.md โ† You are here โ”œโ”€โ”€ ๐Ÿ“„ .gitignore โ”‚ โ”œโ”€โ”€ ๐Ÿ“ src/ โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ backend.js โ† All 9 SOC services + real scanner (15.9KB) โ”‚ โ””โ”€โ”€ ๐Ÿ“„ gateway.js โ† Dashboard UI + reverse proxy (19.4KB) โ”‚ โ”œโ”€โ”€ ๐Ÿ“ scripts/ โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ deploy.js โ† Full MCP-based deployment automation โ”‚ โ””โ”€โ”€ ๐Ÿ“„ cleanup.js โ† Delete all project apps โ”‚ โ””โ”€โ”€ ๐Ÿ“ docs/ โ””โ”€โ”€ ๐Ÿ“„ REPORT.md โ† Comprehensive platform evaluation report ``` --- ## ๐Ÿ“Š Platform Evaluation Summary For the full evaluation with Mermaid diagrams, code examples, live results, and detailed scoring โ†’ **[docs/REPORT.md](./docs/REPORT.md)** | Feature | Score | Notes | | ----------------------- | ------------ | ------------------------------------------ | | ๐Ÿš€ App Deployment | **9.5/10** | Sub-15s to live HTTPS URL | | ๐Ÿค– MCP Protocol | **10/10** | AI-native, works flawlessly | | ๐Ÿ˜ PostgreSQL | **8/10** | Easy provisioning | | ๐Ÿ’พ Volumes | **8.5/10** | Reliable persistent storage | | ๐Ÿชฃ S3 Buckets | **8.5/10** | S3-compatible, instant | | ๐Ÿ” Secrets | **9/10** | โœ… Works โ€” value must be base64 | | ๐ŸŒ Constellations | **9.5/10** | โœ… Works โ€” private net with shared endpoint | | ๐Ÿ”‘ Pull Secrets | **8/10** | โœ… Works โ€” validates credentials live | | ๐Ÿ”’ Network Policy | **7/10** | Not in MCP tools list | | ๐Ÿ’ป Developer Experience | **9.5/10** | All features accessible | | **Overall** | **9.0 / 10** | | --- ## ๐Ÿ“„ License MIT ยฉ 2026