Skip to content

kastelldev/kastell

v2.3.1 Security

This release includes 2 security fixes for security teams reviewing exposed deployments.

✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →
This release patches 2 known CVEs

Topics

automation cli coolify devops digitalocean docker
+10 more
dokploy hetzner linode mcp security-audit self-hosted server-management typescript vps vultr

Affected surfaces

auth rbac

Summary

AI summary

Updates P147, P146/simplify, and P146 across a mixed release.

Full changelog

Security

  • Logger BEARER token redaction hardened — word-boundary matching, 20+ char length floor, provider-pattern dedup; WHOLE vs SUBSTRING pattern split for provider tokens vs API tokens (src/utils/logger.ts)
  • Logger console output redactionsrc/utils/logger.ts redacts tokens/keys/passwords in console output (covers console.log/console.error/stderr)
  • applyWindowsAcl sensitivity-graded policy — secret ACL failures throw (fail-closed), state ACL failures warn; net strengthen of file permission hardening
  • Dev vulnerability advisories remediatedpackage-lock.json reconciliation (41b25f6)

Fixed

  • Test-env detection hardenedapplyWindowsAcl now requires explicit KASTELL_TEST_MODE=1 opt-in (no more path-based heuristic that silently skipped ACL hardening under temp KASTELL_DIR); P119-class recurrence fix
  • Command hints routed to stderr — interactive menu prompt messages no longer pollute stdout; clean snapshot tests + correct log level separation (P147)
  • In-source audit count strings aligneddescribeAuditCatalog cached count now matches release-facing count; eliminates drift between menu catalog and CLI help (P147)
  • Release-facing audit counts aligned with cached describeAuditCatalog output (P147)
  • Linux parity gateopenssh-client install in scripts/test-linux-parity.sh (P147)
  • applyWindowsAcl cause wrap — non-Error CommandFailure.cause defensively wrapped (P146/simplify)
  • runLifecycleStep consolidationrunForwardStep/runRollbackStep inlined (P146/simplify)
  • Command boundary JSON output cleaned for predictable CLI output (P146)
  • Doctor command refactored with withMachineMode helper + applyWindowsAcl isTestEnvironmentDir check lifted (P146/simplify)
  • Windows ACL principal removal batched for performance (P146)
  • Probe bootstrap maintenance API collapsed to single surface (P147)
  • Probe diagnostics digestOnce — Promise lazy-init eliminates eager computation (P147 perf)
  • Audit catalog memoizationdescribeAuditCatalog cached + live mocks (P147)
  • Code-review findings applied — security + drift + perf issues remediated (153c715)

Added

  • withMachineMode helper for test/lock state propagation (src/core/doctor.ts)
  • Plugin SDK v3apiVersion: "2" required, object-shaped checkCommand: { kind, cmd }, per-check mutates flag replaces manifest-level
  • Probe systemsrc/core/probe/{context,executor,diagnostics,payload,sessionStore,types}.ts for active plugin probe sessions with budget tracking, retention, concurrency control
  • Plugin SDK test fixtureskastell-plugin-v2-mutate-bad, kastell-plugin-v2-rawfix-bad, kastell-plugin-v2-readonly, kastell-plugin-mock for SDK contract validation
  • Windows ACL test coveragetests/integration/windows-acl.test.ts for applyWindowsAcl happy path + failure paths + cached path
  • Logger redaction depth testtests/unit/logger-redact-depth.test.ts for WHOLE/SUBSTRING split verification
  • Boot catch-block + strict-mode direct-path coverage for probe bootstrap (P147)
  • Empty-string + circular-context logger.error coverage (P147)
  • Diagnostics.ts branch coverage gaps filled (P147)
  • isTestEnvironmentDir helper exported from applyWindowsAcl (P146)

Changed

  • chunkConcurrent replaces p-limit in fleet.ts (p-limit dependency dropped)
  • serverCompare outputSchema uses discriminatedUnion (outer shape unchanged)
  • PluginRegistryEntry is now a discriminated union (loaded/error/disabled)
  • CI workflow — build artifact shared between jobs (~30s saving per run)
  • Plugin parallel audit — cap=3 (configurable via PLUGIN_AUDIT_PARALLELISM), aggregate timeout (PLUGIN_AUDIT_TOTAL_TIMEOUT_MS, default 120s)
  • File-mtime cache for getServers() and loadLatestAudit(ip) with network FS guard
  • MCP SDK round-trip test for serverCompare schema (tests/unit/mcp/mcp-registration.test.ts)

Removed

  • p-limit npm dependency (replaced by internal chunkConcurrent)
  • Plugin manifest-level mutates and safeToParallel flags (moved to per-check checkCommand.mutates)

Breaking Changes

  • Removed `p-limit` npm dependency (replaced by internal `chunkConcurrent`).
  • Plugin manifest‑level `mutates` and `safeToParallel` flags removed; per‑check `checkCommand.mutates` now required.
  • `applyWindowsAcl` now requires explicit `KASTELL_TEST_MODE=1` opt‑in, changing previous path‑based heuristic behavior.

Security Fixes

  • Logger BEARER token redaction hardened with word‑boundary matching, minimum 20‑character length floor, provider‑pattern deduplication, and whole vs substring pattern handling.
  • Logger console output redaction now masks tokens/keys/passwords in `console.log`, `console.error`, and `stderr`.

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

Track kastelldev/kastell

Get notified when new releases ship.

Sign up free

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.

All releases →

Related context

Earlier breaking changes

  • v2.3.0 `server_secure firewall-status` MCP output: `rules` now an object array instead of string array.
  • v2.3.0 `server_fix` MCP output shape changed: non-apply actions no longer carry `dryRun` field.
  • v2.3.0 `server_fix` MCP input shape changed: `dryRun` removed, replaced by `mode: 'dry-run' | 'live'`.
  • v2.3.0 Plugin SDK audit checks now require apiVersion: "2" and object-shaped checkCommand.

Beta — feedback welcome: [email protected]