Skip to content

v1.0.9: Security Hardening, Persistent Shell & Semantic Search

Latest

Choose a tag to compare

@PwnedBytes0x1 PwnedBytes0x1 released this 08 Sep 13:47

⚡ xdh (xdharness) v1.0.9 Release Notes

This release introduces comprehensive security hardening across plugin loading, session persistence, and network requests, alongside persistent shell state tracking, true LLM-driven context summarization, and ranked BM25 semantic search.

🔒 Security Hardening & Zero-Trust Architecture

  • AST Static Plugin Scanner (Bug 1): Inspects plugin files before importing to detect and block unauthorized execution calls (os.system, subprocess.Popen, shutil.rmtree, pty.spawn).
  • Path Traversal Guard (Bug 2): Sanitizes session IDs and explicitly verifies paths against the session directory using .relative_to(SESSIONS_DIR) in load_session_by_id, save_session, and delete_session.
  • Universal Mutation Safety Guard (Bug 3): Restricts destructive filesystem writes targeting critical operating system paths (/etc, /boot, /system) and sensitive repositories/secrets (.git, .ssh, .env) unless operating in --yolo mode.
  • SSRF Network Protection (Bug 8): Resolves hostnames in fetch_url before dispatching HTTP requests, blocking private (RFC 1918), loopback, link-local metadata (169.254.x), and reserved IP spaces.
  • Prompt Injection Quarantine (Bug 5): Strips non-printable control characters from .xdhrules and .cursorrules files and wraps user rules in isolated advisory blocks to prevent unauthorized instruction override.

🐚 Persistent Shell State & Tool Context

  • Persistent Working Directory (Bug 4): Captures working directory transitions (cd) in background bash executions into harness.current_cwd, ensuring that all file tools (read_file, write_file, replace_file_content, find_by_name) resolve accurately against the active directory.

🧠 Intelligent Context Summarization & Streaming Tag Buffering

  • True Context Compaction (Bug 6): Replaced lossy truncation with LLM-driven structured bullet summarization preserving user intent, modified file paths, and pending tasks, with an extractive fallback to ensure zero memory loss.
  • Tag Fragmentation Buffer (Bug 7): Implemented chunk buffering in SSE stream processing to handle multi-chunk split <think> and </think> tags seamlessly without tag leakage into markdown content.

🔍 Semantic Search & Fine-Grained Metrics

  • BM25 / TF-IDF Semantic Indexing (Upgrade 4): Added score-ranked relevance searching for /index build and /index query.
  • Fine-Grained Token & Cost Tracking (Upgrade 8): Tracks prompt and completion tokens separately (prompt_tokens_consumed vs completion_tokens_consumed) with exact model pricing calculations displayed in /session analytics.