-
Notifications
You must be signed in to change notification settings - Fork 2
feat(tools): snapshot size limit for transactional ShellExecutor #2474
Copy link
Copy link
Closed
Labels
P3Research — medium-high complexityResearch — medium-high complexityenhancementNew feature or requestNew feature or requesttoolsTool execution and MCP integrationTool execution and MCP integration
Description
Context
Follow-up from PR #2473 (transactional ShellExecutor). Security audit identified that large files are copied without bounds during snapshot, risking disk exhaustion.
Proposed Change
Add max_snapshot_bytes: u64 to ShellConfig (default 0 = unlimited). Before copying each file in TransactionSnapshot::capture(), check cumulative snapshot size; abort with ToolError::SnapshotFailed if limit is exceeded.
[tools.shell]
transactional = true
max_snapshot_bytes = 104857600 # 100 MBPriority
P3 — useful safety guard, not blocking for typical use cases.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Research — medium-high complexityResearch — medium-high complexityenhancementNew feature or requestNew feature or requesttoolsTool execution and MCP integrationTool execution and MCP integration