Skip to content

#1152 - Delete BashTools to prevent arbitrary command execution.#1740

Open
simeshev wants to merge 1 commit into
mainfrom
1152-sonarcube-blocker-violations---constructing-the-os-command-from-user-controlled-data
Open

#1152 - Delete BashTools to prevent arbitrary command execution.#1740
simeshev wants to merge 1 commit into
mainfrom
1152-sonarcube-blocker-violations---constructing-the-os-command-from-user-controlled-data

Conversation

@simeshev

Copy link
Copy Markdown
Collaborator

Per internal discussion, we don't see a path forward for protecting framework users from arbitrary command exection using Bash. Embabel users must extreme caution when considering building LLM tools capable of execution of arbitrary commands.

Signed-off-by: Slava Imeshev <imeshev@yahoo.com>
Copilot AI review requested due to automatic review settings June 24, 2026 04:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request removes the BashTools LLM tool (and its associated tests) to eliminate a built-in mechanism for executing arbitrary shell commands via /bin/bash -c, reducing the risk of command execution abuse in Embabel tool integrations.

Changes:

  • Deleted BashTools (@LlmTool-exposed) implementation that executed arbitrary bash commands via ProcessBuilder.
  • Deleted BashToolsTest that validated command execution behavior on Linux/macOS.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
embabel-agent-code/src/main/kotlin/com/embabel/coding/tools/bash/BashTools.kt Removes the @LlmTool that executed arbitrary bash commands.
embabel-agent-code/src/test/kotlin/com/embabel/coding/tools/bash/BashToolsTest.kt Removes tests that exercised the deleted bash execution tool.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@simeshev

Copy link
Copy Markdown
Collaborator Author

@alexheifetz - please take a look when you have time. This is change in functionality, so we should update release notes accordingly.

@sonarqubecloud

Copy link
Copy Markdown

@igordayen

Copy link
Copy Markdown
Contributor

@simeshev, @alexheifetz - while BashTools seems to be removed (no references so far), unsafe command execution remains - see:

/embabel-agent/embabel-agent-code/src/main/kotlin/com/embabel/coding/tools/ci/Ci.kt

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SonarCube Blocker Violations - constructing the OS command from user-controlled data

4 participants