opencode
opencode copied to clipboard
feat: update BashTool command parsing logic
Refined the command parsing logic in BashTool by adding a check for empty command arrays during tree-sitter traversal. This prevent processing malformed shell structures that could lead to unexpected execution behavior.
Security Risk: Potential for command injection or agent escape if malformed input nodes are processed without validation.
Fixes #7478 Fixes #7504