AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

execute_shell does not obey RESTRICT_TO_WORKSPACE setting

Open katmai opened this issue 2 years ago • 0 comments

⚠️ Search for existing issues first ⚠️

  • [X] I have searched the existing issues, and there is no existing issue for my problem

Which Operating System are you using?

Docker

Which version of Auto-GPT are you using?

Master (branch)

GPT-3 or GPT-4?

GPT-3.5

Steps to reproduce 🕹

i have RESTRICT_TO_WORKSPACE=True

sometimes it will go searching for files, or running commands outside the workspace, like the one below.

NEXT ACTION: COMMAND = execute_shell ARGUMENTS = {'command_line': "find / -type f -name 'string'"}

Current behavior 😯

i think it goes outside the directory after too many failures of the following

SYSTEM: Command search_files returned: Error: search_files() got an unexpected keyword argument 'query_string' SYSTEM: Command search_files returned: Error: search_files() got an unexpected keyword argument 'search_string' SYSTEM: Command search_files returned: Error: search_files() got an unexpected keyword argument 'search_term'

which is documented in issue: https://github.com/Significant-Gravitas/Auto-GPT/issues/2673

Expected behavior 🤔

if the restrict to workspace is set to true, i'd expect any commands to be run in the "." folder, eg:

find . -type whatever -name file

or any other shell commands to be run only in the folder.

Your prompt 📝

# Paste your prompt here

Your Logs 📒

<insert your logs here>

katmai avatar Apr 29 '23 19:04 katmai