Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.0.31 Home All releases olderv2.0.30 v2.0.32newer
Claude Code v2.0.31

Enhanced Sed Command Validation

What: Significantly improved security validation for sed commands to prevent dangerous operations while allowing safe read-only usage.

How it works: The validation now uses a comprehensive whitelist approach with multiple layers:

  1. Pre-parsing flag detection - Blocks dangerous flag combinations like -ew, -we before parsing
  2. Whitelist validation - Only allows two safe patterns:
  • Print-only operations with -n flag (e.g., sed -n '1,10p' file.txt)
  • Simple substitutions with safe flags (e.g., sed 's/old/new/' file.txt)
  1. Comprehensive blacklist - Blocks 15+ dangerous patterns including:
  • Write commands (w, W)
  • Execute commands (e, E)
  • Non-ASCII characters and escape sequences
  • Command chaining with semicolons in certain contexts
  • Braces, negation operators, and other advanced features

Details:

  • Builds upon existing sed validation from v2.0.30 (function hoB at line 209135)
  • Adds four new validation helpers: Aj8() at line 209202, Bj8() at line 209245, Qj8() at line 209254, Zj8() at line 209384
  • New validation function JtB() at line 209288 replaces hoB
  • Dangerous flag combination detection in Gj8() at line 209345
  • Prevents file modification and command execution while allowing safe text processing
  • Evidence: Comparison of hoB() at line 209135 in v2.0.30 vs JtB() at line 209288 in v2.0.31

See this entry in the whole of v2.0.31 →