This release includes 5 security fixes for security teams reviewing exposed deployments.
Topics
+10 more
Affected surfaces
Summary
AI summaryAdded MCP Server with 7 AI‑powered tools and hardened security across backups, firewalls, and SSH.
Full changelog
Added
- MCP Server — Built-in Model Context Protocol server for AI-powered server management with 7 tools:
server_info—list,status,health(readOnly)server_logs—logs,monitor(readOnly)server_manage—add,remove,destroy(destructive, SAFE_MODE on destroy)server_maintain—update,restart,maintainserver_secure—secure-setup,secure-audit,firewall-setup,firewall-add,firewall-remove,firewall-status,domain-set,domain-remove,domain-check,domain-infoserver_backup—backup-create,backup-list,backup-restore,snapshot-create,snapshot-list,snapshot-delete(SAFE_MODE on restore/delete)server_provision—create(destructive, SAFE_MODE — creates billable cloud resources)- Structured JSON responses with
suggested_actionsfor AI context optimization - Tool annotations:
readOnlyHint,destructiveHint,idempotentHint,openWorldHint - Rate limiting guidance in tool descriptions
- SAFE_MODE guards on destructive operations (provision, destroy, restore, snapshot-delete)
src/core/module — Pure business logic extracted from CLI commands (no CLI dependencies)status.ts—checkCoolifyHealth,getCloudServerStatus,checkServerStatus,checkAllServersStatustokens.ts—getProviderToken,collectProviderTokensFromEnv(non-interactive token resolution)secure.ts— SSH hardening + audit (pure functions + async wrappers)firewall.ts— UFW management (pure functions + async wrappers)domain.ts— FQDN/DNS management (pure functions + async wrappers)backup.ts— Backup/restore (20 pure functions + SCP helpers)snapshot.ts— Snapshot create/list/delete + cost estimateprovision.ts— Server provisioning (13-step flow: validate → token → SSH → cloudInit → create → boot → IP → save)
src/mcp/module — MCP server implementationsrc/mcp/server.ts— MCP server setup with 7 tool registrationssrc/mcp/tools/— 7 tool handlers (serverInfo, serverLogs, serverManage, serverMaintain, serverSecure, serverBackup, serverProvision)src/mcp/index.ts— stdio transport entry point
bin/quicklify-mcp— MCP server binary entry point- SSRF defense:
assertValidIp()added tocheckCoolifyHealth(IP format validation before HTTP request) - Stack trace sanitization in MCP error responses via
getErrorMessage()
Security
- Path traversal protection:
backupIdvalidated with Zod regex (/^[\w-]+$/) +path.resolve()guard in restore - SAFE_MODE enforcement: Added
isSafeMode()guards onrestart,maintain, andsnapshot-createMCP actions - IP validation hardened:
assertValidIp()now validates octet range (0-255), IP removed from error messages - stderr sanitization: New
sanitizeStderr()function redacts IPs, home paths, tokens, secrets (200 char limit) — applied to all backup/restore/logs error output - Port validation: MCP
server_secureport restricted toz.number().min(1).max(65535) - Provider enum validation: MCP
server_manageprovider changed fromz.string()toz.enum()(prevents invalid provider injection) - Manifest hardening:
serverIpfield removed fromBackupManifesttype, manifest files written withmode: 0o600 - SCP IP validation:
assertValidIp()added toscpDownload()andscpUpload()before spawning child process - Log redaction:
manage.tsstderr no longer exposes server IP address - SSH key auto-generation:
provisionnow auto-generates SSH key when none exists (instead of skipping) .mcp.jsonadded to.gitignore(contains local absolute paths)
Changed
src/commands/status.tsrefactored to usesrc/core/status.ts(DRY: eliminated duplicate Coolify health check)- Test count: 1369 → 1758 (+389 new tests across 9 new test suites)
- Test suites: 55 → 64
Dependencies
- Added
@modelcontextprotocol/sdk^1.27.1 (MCP server SDK) - Added
zod^4.3.6 (MCP input schema validation)
Security Fixes
- Path traversal protection on `backupId` via Zod regex validation and `path.resolve()` guard
- IP validation hardened in `assertValidIp()` to reject malformed octets
- Stderr sanitization across MCP error responses redacts IPs, secrets, and paths
- Port range enforcement (1‑65535) for firewall actions
- Provider enum validation prevents injection of invalid provider strings
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About kastelldev/kastell
Server security auditing and hardening toolkit. 413 security checks across 29 categories (SSH, Firewall, Docker, TLS, HTTP Headers), CIS/PCI-DSS/HIPAA compliance mapping, 19-step production hardening, fleet management, and forensic evidence collection. Supports Hetzner, DigitalOcean, Vultr, and Linode. 13 MCP tools.
Related context
Related tools
Beta — feedback welcome: [email protected]