Skip to content

Commit 5c400a4

Browse files
author
Auto Merge Bot
committed
Implement tool execution subsystem
- Create tool execution module for subprocess spawning - Implement command validation to prevent shell injection - Use subprocess list invocation (no shell) - Add comprehensive tests for tool execution - Handle errors and timeouts properly - Add timeout management with configurable durations - Implement command whitelist (npx, python, node, cargo) - Prevent absolute paths and directory traversal - Detect shell metacharacters in commands and arguments - Support parallel execution of multiple commands - Add 43 comprehensive unit tests (all passing) - Achieve >75% test coverage Closes #519
1 parent 954f016 commit 5c400a4

6 files changed

Lines changed: 1253 additions & 3 deletions

File tree

orchestrator/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ tower-http = { version = "0.6", features = ["trace"] }
4646
rand = "0.9.2"
4747
fastrand = "2.0"
4848

49+
# Async runtime
50+
futures = "0.3"
51+
4952
# Firecracker HTTP client
5053
hyper = { version = "1.0", features = ["full"] }
5154
hyper-util = { version = "0.1", features = ["full"] }
@@ -81,9 +84,6 @@ criterion = "0.8"
8184
# Temporary file management for tests
8285
tempfile = "3.10"
8386

84-
# Async runtime for tests
85-
futures = "0.3"
86-
8787
# System resource monitoring
8888
sysinfo = "0.38"
8989

orchestrator/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ pub mod mcp_command;
1010
pub mod metrics;
1111
pub mod metrics_server;
1212
pub mod rate_limit;
13+
pub mod tools;
1314
pub mod vm;
1415
pub mod webhooks;

0 commit comments

Comments
 (0)