🔧 Fix GitHub Actions docs workflow
- Update mkdocs dependencies to latest versions - Add permissions for GitHub Pages deployment - Add workflow_dispatch for manual trigger - Fix build command with fallback
This commit is contained in:
@@ -6,12 +6,60 @@
|
||||
"source": [
|
||||
"# 🚀 Infrastructure Quick Reference — DAARION & MicroDAO\n",
|
||||
"\n",
|
||||
"**Версія:** 2.0.0 \n",
|
||||
"**Останнє оновлення:** 2025-11-23 \n",
|
||||
"**Версія:** 2.5.0 \n",
|
||||
"**Останнє оновлення:** 2026-01-10 14:55 \n",
|
||||
"\n",
|
||||
"Цей notebook містить швидкий довідник по серверах, репозиторіях та endpoints для DAGI Stack.\n",
|
||||
"\n",
|
||||
"**NEW (v2.0.0):** \n",
|
||||
"---\n",
|
||||
"\n",
|
||||
"## 🆕 What's New (v2.5.0) - Jan 10, 2026\n",
|
||||
"\n",
|
||||
"### 📝 Session Logging System\n",
|
||||
"- ✅ **Автоматичне логування** всіх дій (Git hooks)\n",
|
||||
"- ✅ **Shell integration** — команди `session-start`, `session-log`, `session-end`\n",
|
||||
"- ✅ **Структура логів**: `logs/sessions/`, `logs/CHANGELOG.md`\n",
|
||||
"- 📋 **Документація**: `logs/README.md`\n",
|
||||
"\n",
|
||||
"### 🔄 Git Multi-Remote (3 дзеркала)\n",
|
||||
"- ✅ **GitHub** (origin) — основний репозиторій\n",
|
||||
"- ✅ **Gitea** (localhost:3000) — локальне дзеркало\n",
|
||||
"- ✅ **GitLab** (NODE3:8929) — додаткове дзеркало\n",
|
||||
"- 📋 **Скрипт синхронізації**: `./scripts/git-sync-all.sh`\n",
|
||||
"\n",
|
||||
"### 🏗️ NODE1 Rebuild (Security)\n",
|
||||
"- ✅ **Повний rebuild** — чиста Ubuntu 24.04 LTS\n",
|
||||
"- ✅ **Docker 29.1.4** встановлено\n",
|
||||
"- ✅ **Базове hardening** — UFW, fail2ban\n",
|
||||
"- ⚠️ **Сервіси ще не задеплоєні**\n",
|
||||
"\n",
|
||||
"### 🐳 GitLab on NODE3\n",
|
||||
"- ✅ **GitLab CE** встановлено (порт 8929)\n",
|
||||
"- ✅ **Доступ через SSH tunnel**\n",
|
||||
"- 📋 **Команда**: `ssh -p 33147 -L 8929:localhost:8929 zevs@80.77.35.151`\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"\n",
|
||||
"**🔴 CRITICAL (v2.4.0) - Jan 10, 2026:**\n",
|
||||
"- 🔴 **Incident #4: NODE1 Host Compromise** — RESOLVED via full rebuild\n",
|
||||
"- ✅ NODE1 перевстановлено з нуля\n",
|
||||
"- ⚠️ **Secrets rotation needed** — див. `SECRETS-ROTATION-CHECKLIST.md`\n",
|
||||
"\n",
|
||||
"**v2.3.0:** \n",
|
||||
"- 🖥️ **NODE3 added** - Threadripper PRO 5975WX + RTX 3090 24GB\n",
|
||||
"- 🚀 Most powerful node for AI/ML workloads (32c/64t, 128GB RAM, 4TB NVMe)\n",
|
||||
"- ✅ Security verified - clean system\n",
|
||||
"\n",
|
||||
"**v2.2.0:** \n",
|
||||
"- 🔒 **Security Incident #2** (Jan 9, 2026) - Emergency mitigation completed\n",
|
||||
"- ⚠️ **daarion-web permanently disabled** until secure rebuild\n",
|
||||
"- ✅ Enhanced firewall rules + retry test registered with Hetzner\n",
|
||||
"\n",
|
||||
"**v2.1.0:** \n",
|
||||
"- 🔒 **Security Incident #1 Resolved** (Dec 2025 - Jan 2026)\n",
|
||||
"- ✅ Firewall rules + monitoring deployed\n",
|
||||
"\n",
|
||||
"**v2.0.0:** \n",
|
||||
"- ✅ Мультимодальні сервіси (STT, OCR, Web Search, Vector DB) на НОДА2\n",
|
||||
"- ✅ Router Multimodal Support (інтеграція в процесі)\n",
|
||||
"- ✅ Telegram Gateway Enhanced (STT + Vision)\n",
|
||||
@@ -77,6 +125,18 @@
|
||||
"- **Location:** Local Network (Ivan's Office)\n",
|
||||
"- **Docs:** [NODE-2-MACBOOK-SPECS.md](../NODE-2-MACBOOK-SPECS.md)\n",
|
||||
"\n",
|
||||
"### Node #3: AI/ML Workstation (Threadripper PRO + RTX 3090)\n",
|
||||
"- **Node ID:** node-3-threadripper-rtx3090\n",
|
||||
"- **Hostname:** llm80-che-1-1\n",
|
||||
"- **IP:** 80.77.35.151:33147\n",
|
||||
"- **Role:** AI/ML Workloads, GPU Inference, Kubernetes\n",
|
||||
"- **CPU:** AMD Threadripper PRO 5975WX (32c/64t, 3.6GHz)\n",
|
||||
"- **RAM:** 128GB DDR4\n",
|
||||
"- **GPU:** NVIDIA RTX 3090 24GB (CUDA 13.0)\n",
|
||||
"- **Storage:** Samsung 990 PRO 4TB NVMe\n",
|
||||
"- **OS:** Ubuntu 24.04 LTS + MicroK8s\n",
|
||||
"- **Security:** ✅ Clean (verified 2026-01-09)\n",
|
||||
"\n",
|
||||
"---"
|
||||
]
|
||||
},
|
||||
@@ -109,6 +169,21 @@
|
||||
" \"domain\": None,\n",
|
||||
" \"services\": \"Core only (Router, DevTools, Memory, Ollama)\",\n",
|
||||
" \"specs\": \"M4 Max, 16 cores, 64GB RAM, 2TB SSD, 40-core GPU\"\n",
|
||||
" },\n",
|
||||
" \"node-3\": {\n",
|
||||
" \"name\": \"Threadripper PRO + RTX 3090\",\n",
|
||||
" \"ip\": \"80.77.35.151\",\n",
|
||||
" \"local_ip\": None,\n",
|
||||
" \"role\": \"ai_ml_workstation\",\n",
|
||||
" \"uptime\": \"24/7\",\n",
|
||||
" \"ssh\": \"zevs@80.77.35.151 -p33147\",\n",
|
||||
" \"hostname\": \"llm80-che-1-1\",\n",
|
||||
" \"domain\": None,\n",
|
||||
" \"services\": \"MicroK8s, Ollama (GPU), MongoDB, K8s services\",\n",
|
||||
" \"specs\": \"Threadripper PRO 5975WX (32c/64t), 128GB RAM, RTX 3090 24GB, Samsung 990 PRO 4TB\",\n",
|
||||
" \"gpu\": \"NVIDIA RTX 3090 24GB VRAM (CUDA 13.0)\",\n",
|
||||
" \"os\": \"Ubuntu 24.04 LTS\",\n",
|
||||
" \"security_status\": \"Clean (verified 2026-01-09)\"\n",
|
||||
" }\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
@@ -133,8 +208,8 @@
|
||||
"## 🐙 GitHub Repositories\n",
|
||||
"\n",
|
||||
"### 1. MicroDAO (Current Project)\n",
|
||||
"- **Repository:** `git@github.com:IvanTytar/microdao-daarion.git`\n",
|
||||
"- **HTTPS:** `https://github.com/IvanTytar/microdao-daarion.git`\n",
|
||||
"- **Repository:** `git@github.com:IvanTytar/microdao-daarion`\n",
|
||||
"- **HTTPS:** `https://github.com/IvanTytar/microdao-daarion`\n",
|
||||
"- **Remote Name:** `origin`\n",
|
||||
"- **Main Branch:** `main`\n",
|
||||
"- **Purpose:** MicroDAO core code, DAGI Stack, documentation\n",
|
||||
@@ -159,12 +234,12 @@
|
||||
"REPOSITORIES = {\n",
|
||||
" \"microdao-daarion\": {\n",
|
||||
" \"name\": \"MicroDAO\",\n",
|
||||
" \"ssh_url\": \"git@github.com:IvanTytar/microdao-daarion.git\",\n",
|
||||
" \"https_url\": \"https://github.com/IvanTytar/microdao-daarion.git\",\n",
|
||||
" \"ssh_url\": \"git@github.com:IvanTytar/microdao-daarion\",\n",
|
||||
" \"https_url\": \"https://github.com/IvanTytar/microdao-daarion\",\n",
|
||||
" \"remote_name\": \"origin\",\n",
|
||||
" \"main_branch\": \"main\",\n",
|
||||
" \"purpose\": \"MicroDAO core code, DAGI Stack, documentation\",\n",
|
||||
" \"clone_cmd\": \"git clone git@github.com:IvanTytar/microdao-daarion.git\"\n",
|
||||
" \"clone_cmd\": \"git clone git@github.com:IvanTytar/microdao-daarion\"\n",
|
||||
" },\n",
|
||||
" \"daarion-ai-city\": {\n",
|
||||
" \"name\": \"DAARION.city\",\n",
|
||||
@@ -204,7 +279,76 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 🎨 Vision Encoder Service (NEW)\n",
|
||||
"🤖 Для агентів Cursor: SSH доступ до НОДА1\n",
|
||||
"\n",
|
||||
"### Підключення до Production Server\n",
|
||||
"\n",
|
||||
"**SSH команда:**\n",
|
||||
"```bash\n",
|
||||
"ssh root@144.76.224.179\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"**Робоча директорія:** `/opt/microdao-daarion`\n",
|
||||
"\n",
|
||||
"**Важливо:**\n",
|
||||
"- SSH ключ має бути налаштований локально\n",
|
||||
"- Працюєте від імені `root`\n",
|
||||
"- Завжди перевіряйте `hostname` і `pwd` перед виконанням команд\n",
|
||||
"- Не виконуйте деструктивні команди без підтвердження\n",
|
||||
"\n",
|
||||
"**Повна інструкція:** див. `INFRASTRUCTURE.md` → Для агентів Cursor"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# SSH Access for Cursor Agents\n",
|
||||
"NODE1_ACCESS = {\n",
|
||||
" \"host\": \"144.76.224.179\",\n",
|
||||
" \"user\": \"root\",\n",
|
||||
" \"ssh_command\": \"ssh root@144.76.224.179\",\n",
|
||||
" \"project_root\": \"/opt/microdao-daarion\",\n",
|
||||
" \"auth\": \"SSH key (configured locally)\",\n",
|
||||
" \"common_commands\": [\n",
|
||||
" \"docker ps\",\n",
|
||||
" \"docker compose ps\",\n",
|
||||
" \"docker logs <container_name> --tail 50\",\n",
|
||||
" \"git status\",\n",
|
||||
" \"git pull origin main\",\n",
|
||||
" \"systemctl status docker\"\n",
|
||||
" ],\n",
|
||||
" \"safety_checks\": [\n",
|
||||
" \"Always verify hostname before executing commands\",\n",
|
||||
" \"Never use 'rm -rf' without confirmation\",\n",
|
||||
" \"Never use 'docker rm -f' on production containers\",\n",
|
||||
" \"Always check current directory with 'pwd'\",\n",
|
||||
" \"Document all changes in git commits\"\n",
|
||||
" ]\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"print(\"🔐 SSH Access to NODE1:\")\n",
|
||||
"print(\"=\"*60)\n",
|
||||
"print(f\"Host: {NODE1_ACCESS['host']}\")\n",
|
||||
"print(f\"User: {NODE1_ACCESS['user']}\")\n",
|
||||
"print(f\"Command: {NODE1_ACCESS['ssh_command']}\")\n",
|
||||
"print(f\"Project: {NODE1_ACCESS['project_root']}\")\n",
|
||||
"print(f\"Auth: {NODE1_ACCESS['auth']}\")\n",
|
||||
"print(\"\\nCommon Commands:\")\n",
|
||||
"for cmd in NODE1_ACCESS['common_commands']:\n",
|
||||
" print(f\" - {cmd}\")\n",
|
||||
"print(\"\\n⚠️ Safety Checks:\")\n",
|
||||
"for check in NODE1_ACCESS['safety_checks']:\n",
|
||||
" print(f\" • {check}\")\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"⌘ Vision Encoder Service (NEW)\n",
|
||||
"\n",
|
||||
"### Overview\n",
|
||||
"- **Service:** Vision Encoder (OpenCLIP ViT-L/14)\n",
|
||||
@@ -463,12 +607,132 @@
|
||||
"pd.DataFrame(multimodal_capabilities).T\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 🔒 Security & Incident Response\n",
|
||||
"\n",
|
||||
"### Incident #1: Network Scanning & Lockdown (Dec 6, 2025 - Jan 8, 2026)\n",
|
||||
"\n",
|
||||
"**Root Cause:** Compromised `daarion-web` container with cryptocurrency miner (`catcal`, `G4NQXBp`)\n",
|
||||
"**Impact:** Server locked by Hetzner for 33 days due to internal network scanning\n",
|
||||
"**Resolution:** Container removed, firewall rules implemented, monitoring deployed\n",
|
||||
"\n",
|
||||
"### Incident #2: Recurring Compromise (Jan 9, 2026) 🔴 ACTIVE\n",
|
||||
"\n",
|
||||
"**Root Cause:** Compromised Docker image auto-restarted after server reboot \n",
|
||||
"**Malware:** NEW crypto miners (`softirq`, `vrarhpb`) - different from Incident #1 \n",
|
||||
"**Impact:** \n",
|
||||
"- ❌ Second abuse report (AbuseID: 10F3971:2A)\n",
|
||||
"- ❌ Critical CPU load: 25-35 (normal: 1-5)\n",
|
||||
"- ❌ 1499 zombie processes\n",
|
||||
"- ⚠️ Deadline: 2026-01-09 12:54 UTC (~3.5 hours remaining)\n",
|
||||
"\n",
|
||||
"**Resolution (COMPLETED):** \n",
|
||||
"1. ✅ Killed all malicious processes (softirq, vrarhpb)\n",
|
||||
"2. ✅ Stopped and removed `daarion-web` container\n",
|
||||
"3. ✅ **DELETED Docker images** (78e22c0ee972, 608e203fb5ac) - critical step\n",
|
||||
"4. ✅ Cleaned 1499 zombie processes → 5 (normal)\n",
|
||||
"5. ✅ System load normalized: 30+ → 4.19\n",
|
||||
"6. ✅ Enhanced firewall (SSH rate limiting, port scan blocking)\n",
|
||||
"7. ✅ Registered retry test with Hetzner\n",
|
||||
"8. ⏳ **PENDING:** User statement submission (URGENT)\n",
|
||||
"\n",
|
||||
"**Why Incident #2 Occurred:** \n",
|
||||
"- Incident #1 removed container but LEFT Docker image intact\n",
|
||||
"- Container had `restart: unless-stopped` in docker-compose.yml\n",
|
||||
"- Server rebooted → docker-compose auto-restarted from compromised image\n",
|
||||
"- NEW malware variant installed (different miners than Incident #1)\n",
|
||||
"\n",
|
||||
"**What is daarion-web?** \n",
|
||||
"- Next.js frontend (port 3000) - NOT critical for core functionality\n",
|
||||
"- ✅ Router, Gateway, Telegram bots, API - ALL WORKING\n",
|
||||
"- Status: DISABLED until secure rebuild completed\n",
|
||||
"\n",
|
||||
"**Lessons Learned (Critical):** \n",
|
||||
"1. 🔴 **ALWAYS delete Docker images, not just containers**\n",
|
||||
"2. 🟡 **Auto-restart policies are dangerous for compromised containers**\n",
|
||||
"3. 🟢 **Compromised images can survive container removal**\n",
|
||||
"4. 🔵 **Complete removal = container + image + restart policy change**\n",
|
||||
"\n",
|
||||
"**Next Steps:** \n",
|
||||
"1. 🔴 **URGENT:** Submit statement to Hetzner before deadline\n",
|
||||
"2. 🟡 Monitor server for 24 hours post-statement\n",
|
||||
"3. 🟢 Secure rebuild of daarion-web (see `TASK_REBUILD_DAARION_WEB.md`)\n",
|
||||
"4. 🔵 Security audit all remaining containers\n",
|
||||
"\n",
|
||||
"### Security Measures\n",
|
||||
"\n",
|
||||
"1. **Egress Firewall Rules** (блокування внутрішніх мереж Hetzner)\n",
|
||||
"2. **Monitoring Script** (`/root/monitor_scanning.sh`, runs every 15 min)\n",
|
||||
"3. **Security Checklist:**\n",
|
||||
" - [ ] Container vulnerability scanning\n",
|
||||
" - [ ] Docker Content Trust\n",
|
||||
" - [ ] Resource limits (CPU/memory)\n",
|
||||
" - [ ] Network segmentation\n",
|
||||
" - [ ] Regular security audits\n",
|
||||
"\n",
|
||||
"**Full details:** See `INFRASTRUCTURE.md` → Security & Incident Response section\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Security Configuration (UPDATED with Incident #2)\n",
|
||||
"security_config = {\n",
|
||||
" \"Firewall Rules\": {\n",
|
||||
" \"scripts\": [\"/root/prevent_scanning.sh\", \"/root/block_ssh_scanning.sh\"],\n",
|
||||
" \"status\": \"✅ Enhanced\",\n",
|
||||
" \"blocks\": [\"10.0.0.0/8\", \"172.16.0.0/12\"],\n",
|
||||
" \"allows\": [\"80/tcp\", \"443/tcp\"],\n",
|
||||
" \"features\": [\"SSH rate limiting\", \"Port scan blocking\", \"Enhanced logging\"]\n",
|
||||
" },\n",
|
||||
" \"Monitoring\": {\n",
|
||||
" \"script\": \"/root/monitor_scanning.sh\",\n",
|
||||
" \"status\": \"✅ Active\",\n",
|
||||
" \"interval\": \"15 minutes\",\n",
|
||||
" \"log\": \"/var/log/scan_attempts.log\"\n",
|
||||
" },\n",
|
||||
" \"Incident #1\": {\n",
|
||||
" \"date\": \"2025-12-06\",\n",
|
||||
" \"malware\": \"catcal, G4NQXBp\",\n",
|
||||
" \"recovery_time\": \"33 days\",\n",
|
||||
" \"status\": \"✅ Resolved\"\n",
|
||||
" },\n",
|
||||
" \"Incident #2\": {\n",
|
||||
" \"date\": \"2026-01-09\",\n",
|
||||
" \"malware\": \"softirq, vrarhpb\",\n",
|
||||
" \"mitigation_time\": \"30 minutes\",\n",
|
||||
" \"status\": \"⏳ Statement Pending\",\n",
|
||||
" \"deadline\": \"2026-01-09 12:54 UTC\",\n",
|
||||
" \"actions\": [\"Container removed\", \"Images DELETED\", \"Load normalized\", \"Retry test registered\"]\n",
|
||||
" }\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"import pandas as pd\n",
|
||||
"print(\"🔒 Security Configuration:\")\n",
|
||||
"print(\"=\" * 80)\n",
|
||||
"pd.DataFrame(security_config).T\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 📝 Notes & Updates\n",
|
||||
"\n",
|
||||
"### Recent Changes (2026-01-10)\n",
|
||||
"- 📝 **Session Logging System** — автоматичне логування всіх дій\n",
|
||||
"- 🔄 **Git Multi-Remote** — GitHub + Gitea + GitLab синхронізація\n",
|
||||
"- 🏗️ **NODE1 Rebuild** — чиста Ubuntu 24.04 + Docker 29.1.4\n",
|
||||
"- 🐳 **GitLab on NODE3** — додаткове дзеркало (порт 8929)\n",
|
||||
"- ✅ **Git hooks** — автологування commits/pushes\n",
|
||||
"- ✅ **Shell integration** — команди session-start/log/end\n",
|
||||
"\n",
|
||||
"### Recent Changes (2025-11-23)\n",
|
||||
"- ✅ **Swapper Service інтеграція** в кабінети НОД (тільки в `/nodes/node-1`, `/nodes/node-2`)\n",
|
||||
"- ✅ **Оновлення в реальному часі** (кожні 30 секунд) для Swapper Service\n",
|
||||
@@ -479,9 +743,9 @@
|
||||
"- ✅ **Agent Cabinet Service** (port 8898) для метрик агентів\n",
|
||||
"\n",
|
||||
"### Network Architecture\n",
|
||||
"- **Nodes:** 2 (1 production + 1 development)\n",
|
||||
"- **Nodes:** 3 (NODE1 production + NODE2 development + NODE3 AI/ML)\n",
|
||||
"- **Total Services:** 19 (додано Frontend + Agent Cabinet)\n",
|
||||
"- **Swapper Service:** Тільки в кабінетах НОД, оновлення в реальному часі\n",
|
||||
"- **Git Remotes:** 3 (GitHub + Gitea + GitLab)\n",
|
||||
"- **MicroDAO Cabinets:** 3 (DAARION, GREENFOOD, ENERGY UNION)\n",
|
||||
"- **Node Cabinets:** 2 (НОДА1, НОДА2)\n",
|
||||
"\n",
|
||||
@@ -495,10 +759,145 @@
|
||||
"- **GREENFOOD:** `http://localhost:8899/microdao/greenfood` (оркестратор: GREENFOOD)\n",
|
||||
"- **ENERGY UNION:** `http://localhost:8899/microdao/energy-union` (оркестратор: Helion)\n",
|
||||
"\n",
|
||||
"### Git Repositories\n",
|
||||
"- **GitHub:** `git@github.com:IvanTytar/microdao-daarion.git` (origin)\n",
|
||||
"- **Gitea:** `http://localhost:3000/daarion-admin/microdao-daarion.git`\n",
|
||||
"- **GitLab:** `http://localhost:8929/root/microdao-daarion.git` (через SSH tunnel)\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"\n",
|
||||
"**Last Updated:** 2025-11-23 by Auto AI \n",
|
||||
"**Maintained by:** Ivan Tytar & DAARION Team"
|
||||
"**Last Updated:** 2026-01-10 14:55 (Session Logging System + NODE1 Rebuild) \n",
|
||||
"**Maintained by:** Ivan Tytar & DAARION Team \n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"\n",
|
||||
"### ✅ Security Status\n",
|
||||
"- **NODE1:** Rebuilt from scratch (Ubuntu 24.04 + Docker)\n",
|
||||
"- **NODE3:** Clean (verified 2026-01-09)\n",
|
||||
"- **Secrets:** Rotation pending — див. `SECRETS-ROTATION-CHECKLIST.md`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 🔴 Incident #4: NODE1 Host Compromise (Jan 10, 2026)\n",
|
||||
"\n",
|
||||
"### Summary\n",
|
||||
"ALL PostgreSQL official images show malware artifacts when run on NODE1.\n",
|
||||
"This is **NOT** \"Docker Hub compromised\" — this is **NODE1 host compromise**.\n",
|
||||
"\n",
|
||||
"### Indicators of Compromise (IOC)\n",
|
||||
"```\n",
|
||||
"/tmp/httpd # ~10MB crypto miner (xmrig variant)\n",
|
||||
"/tmp/.perf.c/ # perfctl malware staging directory\n",
|
||||
"/tmp/mysql # Another miner variant\n",
|
||||
"/tmp/cpioshuf # perfctl payload\n",
|
||||
"/tmp/ipcalc* # perfctl payload\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"### Affected Images (on NODE1)\n",
|
||||
"- ❌ postgres:15-alpine\n",
|
||||
"- ❌ postgres:16-alpine\n",
|
||||
"- ❌ postgres:14\n",
|
||||
"- ❌ postgres:16 (Debian)\n",
|
||||
"\n",
|
||||
"### Why This is HOST Compromise (not image)\n",
|
||||
"1. ALL different image variants show same IOC\n",
|
||||
"2. Previous incidents (#1, #2, #3) already compromised NODE1\n",
|
||||
"3. `/tmp/.perf.c/` is classic perfctl malware directory\n",
|
||||
"4. `tmpfs noexec` didn't prevent infection\n",
|
||||
"\n",
|
||||
"### Verification Procedure\n",
|
||||
"```bash\n",
|
||||
"# Run triage script from MacBook (NOT NODE1!)\n",
|
||||
"cd /Users/apple/github-projects/microdao-daarion\n",
|
||||
"./scripts/security/triage-postgres-compromise.sh compare\n",
|
||||
"\n",
|
||||
"# Or manually:\n",
|
||||
"# 1. Get digest from NODE1\n",
|
||||
"ssh root@144.76.224.179 \"docker inspect --format='{{index .RepoDigests 0}}' postgres:16\"\n",
|
||||
"\n",
|
||||
"# 2. Pull same digest on MacBook\n",
|
||||
"docker pull postgres:16@sha256:<digest>\n",
|
||||
"\n",
|
||||
"# 3. Check if clean\n",
|
||||
"docker run --rm postgres:16@sha256:<digest> ls -la /tmp/\n",
|
||||
"# If empty → NODE1 compromised, image is clean\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"### Current Status\n",
|
||||
"- ⏳ **Verification pending** — Need to test on clean host\n",
|
||||
"- 🔴 **NODE1 UNSAFE** — Do not deploy PostgreSQL\n",
|
||||
"- 🟡 **Secrets rotation needed** — Assume all compromised\n",
|
||||
"\n",
|
||||
"### Full Documentation\n",
|
||||
"See `INFRASTRUCTURE.md` → Incident #4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 📝 Session Logging System\n",
|
||||
"\n",
|
||||
"### Автоматичне логування всіх дій\n",
|
||||
"\n",
|
||||
"Система автоматично записує всі дії при роботі над проєктом.\n",
|
||||
"\n",
|
||||
"### Структура логів\n",
|
||||
"```\n",
|
||||
"logs/\n",
|
||||
"├── README.md # Документація\n",
|
||||
"├── CHANGELOG.md # Головний журнал змін\n",
|
||||
"├── sessions/ # Щоденні логи сесій\n",
|
||||
"│ └── YYYY-MM-DD.md # Лог конкретного дня\n",
|
||||
"├── operations/ # Операційні логи\n",
|
||||
"└── incidents/ # Логи інцидентів\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"### Команди (після `source ~/.zshrc`)\n",
|
||||
"\n",
|
||||
"| Команда | Опис |\n",
|
||||
"|---------|------|\n",
|
||||
"| `session-start \"опис\"` | Почати сесію |\n",
|
||||
"| `session-log \"дія\"` | Додати запис |\n",
|
||||
"| `session-end` | Завершити (commit + push) |\n",
|
||||
"| `daarion-note \"нотатка\"` | Швидка нотатка |\n",
|
||||
"| `git-sync` | Push на всі remote |\n",
|
||||
"\n",
|
||||
"### Автоматичне логування (Git hooks)\n",
|
||||
"- ✅ Кожен `git commit` → записується в session log\n",
|
||||
"- ✅ Кожен `git push` → записується в session log\n",
|
||||
"\n",
|
||||
"### Встановлення\n",
|
||||
"```bash\n",
|
||||
"# 1. Встановити Git hooks\n",
|
||||
"./scripts/logging/install-hooks.sh\n",
|
||||
"\n",
|
||||
"# 2. Додати shell integration\n",
|
||||
"echo 'source /path/to/scripts/logging/shell-integration.sh' >> ~/.zshrc\n",
|
||||
"source ~/.zshrc\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"### Git Multi-Remote (3 дзеркала)\n",
|
||||
"```bash\n",
|
||||
"# Всі remote\n",
|
||||
"git remote -v\n",
|
||||
"# origin git@github.com:IvanTytar/microdao-daarion.git\n",
|
||||
"# gitea http://localhost:3000/daarion-admin/microdao-daarion.git\n",
|
||||
"# gitlab http://localhost:8929/root/microdao-daarion.git\n",
|
||||
"\n",
|
||||
"# Push на всі\n",
|
||||
"./scripts/git-sync-all.sh\n",
|
||||
"# або\n",
|
||||
"git push origin && git push gitea && git push gitlab\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"### SSH Tunnel до GitLab (NODE3)\n",
|
||||
"```bash\n",
|
||||
"ssh -p 33147 -L 8929:localhost:8929 -N zevs@80.77.35.151 &\n",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user