- spec_executor.py: resolve relative paths against workspace (not CWD),
strip leading env var assignments before binary check (e.g. PYTHONPATH=/)
- policy_engine.py: direct dispatch tool set (read/write/edit/shell_execute/
notebook_add), shell_execute now validates non-empty command before dispatch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Gap 1: Spec-declared workspace now bypasses tool-level path checks for
filesystem ops. Direct filesystem operations when workspace differs from
default, executor's own PolicyEngine check is sufficient.
Gap 2: shell_allowlist in spec constraints extends PolicyEngine's base
allowlist per-spec. Specs can allow additional commands without weakening
global security.
Gap 3: New edit_file tool β targeted find-and-replace. Reads file, verifies
old_text exists exactly once, replaces with new_text. Safer than full
overwrite for cross-repo work. Wired through PolicyEngine, TOOL_REGISTRY,
facade, and spec schema.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove echo and cat from shell allowlist β both bypass write_file gateβ