This repository has been archived on 2026-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
Levi Neely
5f8c41b576
Implement MCP code execution pattern (#20)
* Implement MCP code execution pattern
- Add execute_code tool for bash execution in landrun sandbox
- Remove redundant MCP tools (read_inbox, send_message, etc.)
- Implement dynamic tool discovery from ~/.config/anvillm/mcptools/
- Add workspace isolation (~/.cache/anvillm/exec)
- Add security: output limits, concurrency limits, validation, path traversal protection
- Update bot templates (Conductor, Taskmaster) with bash examples
- Update anvillm-communication skill to use execute_code pattern
- Create comprehensive documentation (user guide, migration guide, security guide)
- Add test suite for validation and limitedWriter
- Fix landrun flags: --rox for executables, --env for AGENT_ID passthrough
- Network blocked by default (no --connect-tcp or --unrestricted-network)
Token reduction: 80-99% via progressive tool discovery and subprocess data processing
* Fix code review issues in MCP code execution pattern
- Security: Change security.jsonl permissions from 0644 to 0600
- Bug: Fix limitedWriter to return correct byte count for io.Copy
- Bug: Fix tool schema inconsistency (execute_code requires only 'code')
- Performance: Move whitespace regex to package-level var
- Security: Improve validateCode with regex patterns and normalization
- Cleanup: Remove dead code from main.go and tools.go
- Cleanup: Rewrite shell scripts to use jq for safe JSON construction
- Docs: Fix duplicate sections and JavaScript syntax in bash examples
* Improve code validation security patterns
- Fix rm -rf bypass: allow optional whitespace before /
- Expand rm -rf to block sensitive paths (/home, /var, /usr, etc.)
- Block all network protocols in curl/wget (not just http/https)
- Add test for regex pattern compilation
- Add test cases for tabs, sensitive paths, ftp/file protocols
* Harden shell scripts and improve rate limiting
---------
Co-authored-by: Levi Neely <lkn@darkstar.example.net>
Co-authored-by: Levi Neely <lneely@pascom.net>
|
2026-02-26 14:02:54 +01:00 |
| .. |
|
diagrams
|
Add anvilmcp connection to Backends in architecture diagram
|
2026-02-22 12:52:46 +01:00 |
|
capability-levels.md
|
cost / usage optimization, phase 1
|
2026-02-25 19:17:50 +01:00 |
|
code-execution-examples.md
|
Implement MCP code execution pattern (#20)
|
2026-02-26 14:02:54 +01:00 |
|
code-execution-migration-guide.md
|
Implement MCP code execution pattern (#20)
|
2026-02-26 14:02:54 +01:00 |
|
code-execution-pattern.md
|
Implement MCP code execution pattern (#20)
|
2026-02-26 14:02:54 +01:00 |
|
code-execution-security-guide.md
|
Implement MCP code execution pattern (#20)
|
2026-02-26 14:02:54 +01:00 |
|
code-execution-security.md
|
Implement MCP code execution pattern (#20)
|
2026-02-26 14:02:54 +01:00 |
|
code-execution-user-guide.md
|
Implement MCP code execution pattern (#20)
|
2026-02-26 14:02:54 +01:00 |
|
ollama-backend.md
|
Add ollama backend support
|
2026-02-21 21:03:55 +01:00 |
|
testing-code-execution.md
|
Implement MCP code execution pattern (#20)
|
2026-02-26 14:02:54 +01:00 |