Add Docker sandbox backend as an alternative to Podman - #40
Open
mariotrace wants to merge 2 commits into
Open
Conversation
Some environments have Docker but not Podman available. Adds a DockerSandboxManager/DockerSandbox implementing the same SandboxManager/ SandboxSession protocol as the existing Podman backend, using Docker's --network container:<name> mode to replicate Podman pod networking (app + exploit containers sharing localhost). Selectable via sandbox.engine: "docker" | "podman" in config (defaults to "podman", so existing behavior is unchanged). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Config default stays "podman"; this file shouldn't have opted the primary Bedrock eval config into the Docker backend. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
Author
|
I asked Claude Opus to do a review and some local tests. Result below. Review's in. Verdict: the Docker port is solid — no correctness or security bugs in Consistency with Podman — the thing you were worried about:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
DockerSandboxManager/DockerSandbox, implementing the existingSandboxManager/SandboxSessionprotocol via thedockerCLI instead ofpodman.connected via
--network container:<app>, Docker's equivalent of a sharedpod network namespace — verified this gives the exploit container
localhostaccess to the app container exactly like the Podman pod does.sandbox.engine: "docker" | "podman"(
config.py), default remains"podman"— no behavior change for existingsetups.
data/config/forge-bedrock.yamlopts intoengine: "docker"as an example.Test plan
forge run CVE-2021-44228 --config data/config/forge-bedrock.yaml) end-to-end against the Docker backend:app container built, deployed, health-checked; exploit container
reached the app via the shared network namespace; exploitation
completed (level 3); containers cleaned up after the run with no
leftovers.
Note:
forge-exploit-runner:latestis expected to already exist locally(built outside this repo, same as for the Podman backend) — this PR doesn't
change how that image is built/sourced.
🤖 Generated with Claude Code