Skip to content

fix(m7.1): Security Hardening (@rsp Trust, TOCTOU, Python DoS & MCP Guards) - #123

Merged
vstiago merged 2 commits into
mainfrom
feat/7.1-security-hardening
Dec 6, 2026
Merged

vstiago merged 2 commits into
mainfrom
feat/7.1-security-hardening

Conversation

@vstiago

@vstiago vstiago commented Dec 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Enforces containment & explicit workspace trust on @file.rsp response files in compile_db.py (preventing path traversal and untrusted flag injection bypassing compile_commands.json trust).
  • Eliminates TOCTOU in config.py / compile_db.py via WorkspaceTrustStore.read_trusted_bytes() and switches trust.json saves to atomic os.replace().
  • Guards python-dis & python-ast against RecursionError/MemoryError/oversized inputs and fixes UTF-8 line-boundary truncation.
  • Adds 16 MiB NDJSON line caps in rpc.py & mcp_server.py, fixes bool("false") coercion, validates MCP protocolVersion, and blocks output-writing/plugin-loading flags in MCP extra_args.

Closes #111
Closes #112
Closes #113

@vstiago
vstiago merged commit 357653e into main Dec 6, 2026
12 checks passed
@vstiago
vstiago deleted the feat/7.1-security-hardening branch December 6, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant