fix(monitoring,db,proxy): cap/dedupe shared-host disk mounts, index metrics_disks, defer startup maintenance & bind split proxy port

This commit is contained in:
tyuXX 2026-11-28 16:18:15 +00:00
parent 65d88f0a1e
commit 5933727a01
8 changed files with 292 additions and 19 deletions

View file

@ -111,7 +111,7 @@ GCoordinator/
│ │ ├── app.ts # createGCoordinatorServer() wiring, middleware order, Panic Lock, /metrics
│ │ ├── db/
│ │ │ ├── database.ts # SQLite WAL connection, throttle PRAGMAs & ordered migration runner
│ │ │ └── migrations/ # 001_initial.ts, 002_multi_auth.ts, 003_phase4_meta.ts, 004_v1_1.ts
│ │ │ └── migrations/ # 001_initial.ts .. 005_metrics_disks_indexes.ts
│ │ ├── security/
│ │ │ ├── vault.ts # VaultService (AES-256-GCM, runtime-ready vs write-locked, seal(), Ed25519)
│ │ │ ├── auth.ts # AuthService (Argon2id queue, multi-password, encrypted TOTP, idle TTL, WebAuthn)
@ -228,7 +228,7 @@ GCoordinator/
### 5. Config Hot-Reload, Symlink Safety & SQLite Migrations (`config-manager.ts`, `database.ts`)
- Every config write uses atomic staging (`tmp -> fsync -> rename`), rejects symlinks across config/backup/CLI file operations, validates against Zod schemas, and records `config_revisions`. Invalid hand-edited config files stay isolated without crashing the hub.
- Never mutate existing migration files (`001_initial.ts`, `002_multi_auth.ts`, `003_phase4_meta.ts`, `004_v1_1.ts`) destructively; add new schema changes as `005_*.ts` and register them in `src/server/db/database.ts`.
- Never mutate existing migration files (`001_initial.ts`, `002_multi_auth.ts`, `003_phase4_meta.ts`, `004_v1_1.ts`, `005_metrics_disks_indexes.ts`) destructively; add new schema changes as `006_*.ts` and register them in `src/server/db/database.ts`.
### 6. SSH, Shell Quoting, Egress Guard & Dual-Mode Isolated Proxy (`egress-guard.ts`, `tunnel-manager.ts`)
- **Zero-Trust Egress Guard (`egress-guard.ts`)**: All outbound hub HTTP calls (HTTP probes, webhook deliveries, BYO AI requests, workflow `http` steps) must go through `fetchWithEgressGuard()` / `assertSafeEgressUrl()`, which default-denies loopback, private, link-local, carrier-grade NAT, and cloud-metadata IPs/DNS resolutions, disables automatic redirects (`redirect: 'error'`), and honors explicit `settings.security.egressAllowedCidrs` opt-ins.