Claw Code Beta Security Patch Released

Spent the morning shipping a production-grade security hardening patch for Claw Code Beta — here's what it took. What started as a 5-file patch turned into a full architectural overhaul. Here's what we built and verified: What changed: Centralised permission enforcement — all built-in tools, plugin tools, and runtime/MCP tools now flow through one enforcement path. No more bypass gaps. Workspace-safe file operations — every write, edit, and notebook mutation is boundary-checked against the active workspace before execution. Canonical path resolution, not string prefix matching. Prompt-mode hardened — out-of-bounds writes are now rejected immediately before confirmation is even surfaced. Fail-closed by design. Full monolith split — main.rs went from 5,400+ lines to 1,564. lib.rs from a giant file to 470 lines, with catalog.rs, dispatch.rs, registry.rs, and cli_tools.rs carrying focused responsibilities. Flaky MCP timing test replaced with a deterministic mock. Property tests added for path normalisation and glob-boundary parsing. End-to-end approval-path test covering the full prompt → confirm → execute flow. All 6 root docs rewritten from scratch — README, CLAUDE, PHILOSOPHY, PARITY, ROADMAP, USAGE — accurate and consistent with the actual system. Verification gates — both green: ✅ cargo test --workspace — 697 tests, 0 failures ✅ cargo clippy --all-targets --all-features -- -D warnings — 0 warnings Score across 5 engineering dimensions: 88/100 with a clear path to 99. Production verdict from the reviewer: "Production-capable for internal use and trusted operator workflows." The most important lesson from this session: a passing test suite is not enough. Real production readiness means every tool path is mediated, defaults are safe, and the codebase can be maintained by someone who wasn't there when it was written. Still working toward 99. The remaining gaps are known, documented, and on the roadmap. #Rust #SystemsProgramming #OpenSource #ProductionEngineering #CodeQuality #ClawCode

To view or add a comment, sign in

Explore content categories