Repository navigation
feat(env): optional passwordless sudo for the sandbox agent #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,9 @@ class AgentBoss(MicroBot): | |
| image : Optional[str] | ||
| Shell-server image of the auto-created environment, for example | ||
| ``images.AZURELINUX_IMAGE``. Defaults to None (Debian image). | ||
| sudo_access : bool | ||
| Give the sandbox's agent account passwordless ``sudo`` (needed by | ||
| tools such as ``mock``). Defaults to False. | ||
|
|
||
| Workflow | ||
| -------- | ||
|
|
@@ -49,6 +52,7 @@ def __init__( | |
| environment: Optional[any] = None, | ||
| additional_tools: Optional[list[ToolAbstract]] = None, | ||
| image: Optional[str] = None, | ||
| sudo_access: bool = False, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might give sudo access all the sub-agents that AgentBoss creates
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is expected. We don't have fine-grained control over the sub-agents as of now. We'll address this later along with improving overall AgentBoss experience. |
||
| ): | ||
| """ | ||
| Create the bot with the ``microbot_sub`` tool and the repository mounted read-write. | ||
|
|
@@ -67,6 +71,9 @@ def __init__( | |
| image : Optional[str] | ||
| Shell-server image of the auto-created environment, for example | ||
| ``images.AZURELINUX_IMAGE``. Defaults to None (Debian image). | ||
| sudo_access : bool | ||
| Give the sandbox's agent account passwordless ``sudo`` (needed by | ||
| tools such as ``mock``). Defaults to False. | ||
| """ | ||
| if additional_tools is None: | ||
| additional_tools = [] | ||
|
|
@@ -123,6 +130,7 @@ def __init__( | |
| additional_tools=additional_tools, | ||
| folder_to_mount=folder_mount_info, | ||
| image=image, | ||
| sudo_access=sudo_access, | ||
| ) | ||
|
|
||
| def run( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if the agent opens its own bash session using
sudo bashand run the comamnds?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true. When the Agent is given
sudoaccess, all sorts of privileged things are possible. So, we included multiple warnings in this flow. The documentation assumes that the agent will be co-operative.If the model becomes rogue, we don't have any real guardrail against it. This is applicable for all the privileged agents. Thus, the developer should be cautious before enabling this and the system where this agent runs shouldn't be critical for production operations.