Add Linux agent confinement reference and causal bypass tests - #662
Merged
Merged
Conversation
Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
imran-siddique
marked this pull request as ready for review
September 18, 2026 15:42
imran-siddique
requested review from
a team,
carloshvp,
qubeena07 and
zohebk8s
as code owners
September 18, 2026 15:43
zohebk8s
approved these changes
Sep 18, 2026
9 tasks
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.
What
Add an experimental Linux Docker adapter that confines an agent's direct egress and routes its bounded stdio requests through cMCP. A synthetic harness observes network, filesystem, logging and tool delivery independently, then removes each restriction to require an observable bypass.
Why
Progresses #659, tracked under agentrust-io/.github#41. Sink ceilings alone do not stop an agent that can send plaintext around the gateway. This supplies the first executable confinement profile and keeps deployment supervision, broader exporter coverage and hardware-backed custody open in the issue.
Security impact
No runtime defaults or TEE claims change. The reference assumes a trusted native Linux host, local Docker daemon, bridge, cMCP and approved tools. It checks effective container settings before input, rejects piped host core handlers, applies hard core limits, blocks agent-supplied policy replacement and terminates failed exchanges. The crash-dump gate incorporates the feedback on #659.
Docker mutations are test-only and use synthetic canaries on a disposable CI runner. They first prove inspection rejects the weakened profile, then bypass that inspection to measure the underlying restriction. This does not establish protection against a malicious host, downstream tool misuse, covert channels or all audit/export paths. See
docs/confinement.mdfor the route inventory and remaining scope.Test plan
ruff check src tests examples/confinement.mypy src/cmcp_runtimeand Bandit oversrc.confinement-evidenceartifact contains numeric independent sink observations, JUnit results and host versions.4817c3d: all 14 hosted checks passed, including Python 3.11–3.13 on Linux and Windows; the main-only benchmark was skipped.The first hosted run stalled on stderr-flood cleanup after the other cases passed. Draining the terminated attach client's remaining pipes fixes that deadlock; the final run completes in seconds. The harness now also has an external timeout so a cleanup regression cannot wait indefinitely.
DCO sign-off