Skip to content

Conversation

@tsmithsz
Copy link
Contributor

Problem

Amazon Q Agentic Chat needs the ability to execute bash commands

Solution

Testing

ExecuteBash Tool
extensionHostProcess.js:178
    ✔ pass validation for a safe command (read-only)
extensionHostProcess.js:178
    ✔ fail validation if the command is empty
extensionHostProcess.js:178
    ✔ set requiresAcceptance=true if the command has dangerous patterns
extensionHostProcess.js:178
    ✔ set requiresAcceptance=false if it is a read-only command
extensionHostProcess.js:178
    ✔ whichCommand cannot find the first arg
extensionHostProcess.js:178
    ✔ whichCommand sees first arg on PATH
extensionHostProcess.js:178
    ✔ stub invoke() call
extensionHostProcess.js:178
  7 passing (45ms)

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@tsmithsz tsmithsz requested review from a team as code owners March 25, 2025 09:09
@github-actions
Copy link

  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@tsmithsz
Copy link
Contributor Author

/retrybuilds

@tsmithsz tsmithsz force-pushed the feature/agentic-chat branch from 69572a7 to ef7da20 Compare March 25, 2025 23:05
@mr-lee mr-lee merged commit 6269bce into aws:feature/agentic-chat Mar 25, 2025
14 of 17 checks passed
return output
}

private static parseCommand(command: string): string[] | undefined {
Copy link
Contributor

Choose a reason for hiding this comment

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

Parsing bash/shell commands is non-trivial. Is this intended to support arbitrary bash command, or only very simple cases?

Copy link
Contributor

Choose a reason for hiding this comment

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

Here's an example: #7230

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.

5 participants