opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: update BashTool command parsing logic

Open RinZ27 opened this issue 1 week ago • 2 comments

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

RinZ27 avatar Jan 05 '26 14:01 RinZ27