-
Notifications
You must be signed in to change notification settings - Fork 22
container_shell: isolated network by default, plus optional network transport #93
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0ead3e8
Default container_shell to an isolated network with opt-in networking
anticomputer 5e201ec
Document container_shell env vars and network-mode selection
anticomputer 065b75b
Key persistent containers on network mode to preserve isolation
anticomputer 900131e
Avoid accumulating atexit handlers when reloading in tests
anticomputer ea8cc12
Add optional network transport to container_shell MCP server
anticomputer 3e6d64b
Rename the container shell tool to container_shell_exec
anticomputer afa2a3c
Add a remote container shell toolbox
anticomputer e4a1d71
Defer CONTAINER_SHELL_PORT parsing to network transport startup
anticomputer adab2d4
Fall back to the default host when CONTAINER_SHELL_HOST is blank
anticomputer 11ab054
Document the default egress lock in container_shell prompts and docs
anticomputer a02078a
Add toolbox YAML validation test for container_shell_remote
anticomputer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/seclab_taskflows/toolboxes/container_shell_remote.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # SPDX-FileCopyrightText: GitHub, Inc. | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| seclab-taskflow-agent: | ||
| filetype: toolbox | ||
| version: "1.0" | ||
|
|
||
| # Remote variant of the container shell. Instead of launching container_shell | ||
| # as a local stdio subprocess (which needs a Docker socket in the agent | ||
| # environment), this connects to a container_shell MCP server that is already | ||
| # running elsewhere over Streamable HTTP. The server owns the Docker daemon; the | ||
| # agent only speaks MCP to it. This is what lets an AWF-isolated agent use | ||
| # containerized shell execution without ever being handed a Docker socket: the | ||
| # server runs outside the sandbox and is reached over a single allowlisted host | ||
| # service port. | ||
| # | ||
| # CONTAINER_SHELL_URL must point at the running server's Streamable HTTP | ||
| # endpoint, for example http://host.docker.internal:8765/mcp/. | ||
| server_params: | ||
| kind: streamable | ||
| url: "{{ env('CONTAINER_SHELL_URL') }}" | ||
|
|
||
| confirm: | ||
| - container_shell_exec | ||
|
|
||
|
anticomputer marked this conversation as resolved.
|
||
| server_prompt: | | ||
| ## Container Shell (remote) | ||
| You have access to an isolated Docker container running on a remote shell | ||
| server. Use `container_shell_exec` to run commands inside it. The working | ||
| directory is /workspace (mapped from the host workspace if configured). | ||
|
|
||
|
anticomputer marked this conversation as resolved.
|
||
| Available tools in this container: | ||
| - bash, coreutils (ls, cat, grep, find, sed, awk, sort, uniq, wc, ...) | ||
| - file: identify file type by magic bytes | ||
| - strings: extract printable strings from binary files | ||
| - objdump: disassemble and dump object/binary files | ||
| - readelf: display ELF binary structure | ||
| - nm: list symbols from object files | ||
| - xxd / hexdump: hex inspection | ||
| - python3: scripting | ||
| - curl / wget: HTTP requests | ||
| - git: version control | ||
|
|
||
| Outbound networking may be disabled by default: egress is controlled by the | ||
| remote server's `CONTAINER_NETWORK` setting, so `curl`, `wget`, and `git` | ||
| remote operations only work when the server has networking enabled. | ||
|
|
||
| All commands run inside the container. Output includes stdout, stderr, and exit code. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.