This release includes 2 security fixes for security teams reviewing exposed deployments.
Topics
+10 more
Affected surfaces
Summary
AI summaryUpdates 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 redaction —
src/utils/logger.tsredacts tokens/keys/passwords in console output (coversconsole.log/console.error/stderr) applyWindowsAclsensitivity-graded policy — secret ACL failures throw (fail-closed), state ACL failures warn; net strengthen of file permission hardening- Dev vulnerability advisories remediated —
package-lock.jsonreconciliation (41b25f6)
Fixed
- Test-env detection hardened —
applyWindowsAclnow requires explicitKASTELL_TEST_MODE=1opt-in (no more path-based heuristic that silently skipped ACL hardening under tempKASTELL_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 aligned —
describeAuditCatalogcached count now matches release-facing count; eliminates drift between menu catalog and CLI help (P147) - Release-facing audit counts aligned with cached
describeAuditCatalogoutput (P147) - Linux parity gate —
openssh-clientinstall inscripts/test-linux-parity.sh(P147) applyWindowsAclcause wrap — non-ErrorCommandFailure.causedefensively wrapped (P146/simplify)runLifecycleStepconsolidation —runForwardStep/runRollbackStepinlined (P146/simplify)- Command boundary JSON output cleaned for predictable CLI output (P146)
- Doctor command refactored with
withMachineModehelper +applyWindowsAclisTestEnvironmentDircheck 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 memoization —
describeAuditCatalogcached + live mocks (P147) - Code-review findings applied — security + drift + perf issues remediated (
153c715)
Added
withMachineModehelper for test/lock state propagation (src/core/doctor.ts)- Plugin SDK v3 —
apiVersion: "2"required, object-shapedcheckCommand: { kind, cmd }, per-checkmutatesflag replaces manifest-level - Probe system —
src/core/probe/{context,executor,diagnostics,payload,sessionStore,types}.tsfor active plugin probe sessions with budget tracking, retention, concurrency control - Plugin SDK test fixtures —
kastell-plugin-v2-mutate-bad,kastell-plugin-v2-rawfix-bad,kastell-plugin-v2-readonly,kastell-plugin-mockfor SDK contract validation - Windows ACL test coverage —
tests/integration/windows-acl.test.tsforapplyWindowsAclhappy path + failure paths + cached path - Logger redaction depth test —
tests/unit/logger-redact-depth.test.tsfor WHOLE/SUBSTRING split verification - Boot catch-block + strict-mode direct-path coverage for probe bootstrap (P147)
- Empty-string + circular-context
logger.errorcoverage (P147) - Diagnostics.ts branch coverage gaps filled (P147)
isTestEnvironmentDirhelper exported fromapplyWindowsAcl(P146)
Changed
chunkConcurrentreplacesp-limitin fleet.ts (p-limit dependency dropped)serverCompareoutputSchema usesdiscriminatedUnion(outer shape unchanged)PluginRegistryEntryis 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()andloadLatestAudit(ip)with network FS guard - MCP SDK round-trip test for
serverCompareschema (tests/unit/mcp/mcp-registration.test.ts)
Removed
p-limitnpm dependency (replaced by internalchunkConcurrent)- Plugin manifest-level
mutatesandsafeToParallelflags (moved to per-checkcheckCommand.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
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
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]