Repository navigation
feat(sandbox): support secure Chromium isolation (#4098) - #5946
sunilteja93 wants to merge 4 commits into
Conversation
Signed-off-by: Sunil Kumar Vadlamani <25136458+sunilteja93@users.noreply.github.com>
Signed-off-by: Sunil Kumar Vadlamani <25136458+sunilteja93@users.noreply.github.com>
Signed-off-by: Sunil Kumar Vadlamani <25136458+sunilteja93@users.noreply.github.com>
Signed-off-by: Sunil Kumar Vadlamani <25136458+sunilteja93@users.noreply.github.com>
|
Heads-up: this PR changes both files in paths that are frozen in this repository while the Docker, Podman and VM drivers move to ai-openshell/desktop, and files that stay in core. The move is tracked in #5200, and this PR in #6167. Frozen files in this PR: The |
|
Thanks for the heads-up, @elezar. I reviewed #5200 and #6167. This Draft PR has one frozen Podman driver file ( I'm happy to split the work while preserving authorship. Would you prefer that I open the driver-side PR in @drew, I'd also appreciate an architectural decision before porting or expanding this implementation. The proposed separately managed browser boundary keeps the existing agent workload restrictions intact. So far, native Chromium renderer sandboxing passes in standalone network-disabled rootless Podman with narrowly scoped Would a separate OpenShell-managed browser boundary meet #4098's in-guest acceptance criterion, or should we pursue an in-workload compatibility mechanism instead? I'll keep this PR in Draft, preserve the current evidence, and take the appropriate split and implementation path once the direction is clear. Thanks! |
| /// This builder does not authorize access to the browser. The caller must | ||
| /// provide an authenticated control channel and full lifecycle management | ||
| /// before a browser container can be started. | ||
| pub fn build_browser_container_spec( |
There was a problem hiding this comment.
Why are these podman-only? What are the expectations for the other drivers?
There was a problem hiding this comment.
Thanks @elezar, that's a valid point.
The initial implementation is podman-specific because I started with the runtime where I could reproduce the Chromium namespace restriction and validate native chromium renderer sandboxing in a standalone, restricted container.
I don't intend podman-only support to be the final scope of #4098. The issue explicitly covers both Podman and microVM, so both need supported implementations and regression coverage. For Docker and Kubernetes, I haven't validated an equivalent boundary yet, and I wouldn't want to claim support or relax their existing security restrictions.
My preference is to keep the security requirements runtime-independent, while allowing each driver to implement and verify an appropriate isolation mechanism. Unsupported configurations should fail explicitly without falling back to "--no-sandbox".
Would you prefer a shared browser-execution capability or contract across compute drivers, with runtime-specific implementations, rather than introducing the browser specification directly in the Podman driver?
I also want to confirm whether the separately managed browser boundary is an acceptable direction before extending the implementation.
Happy to adjust the design based on your guidance.
Summary
Draft work toward security-preserving Chromium compatibility for #4098. This PR currently contains a verified standalone native Chromium renderer-sandbox probe, ordinary-workload security regression coverage, and an unwired Podman browser-container specification. It does not yet provide a supported Chromium workflow inside OpenShell.
Related issues and migration
Closes #4098. Related: #5200 and #6167.
Desktop-driver migration:
crates/openshell-driver-podman/src/container.rsis a frozen path in core. Per #6167, this mixed PR must be split into core-side changes and a driver-side change in ai-openshell/desktop, preserving authorship. The correct destination for driver-specific E2E fixtures should be confirmed with maintainers during the split. Please do not merge this PR as-is.Implemented
NoNewPrivs=1, zero effective/bounding capabilities, active seccomp, and denial of nested user namespaces andchroot.--network=none --cap-drop=all --cap-add=SYS_CHROOT --security-opt=no-new-privileges, the probe reportedCHROMIUM_SANDBOX_VERIFIED renderers=3. This is not proof of browser functionality inside OpenShell or a reviewed production capability policy.build_browser_container_spec()with unit tests for image pinning, network isolation, secret/mount isolation, and restricted container privileges. The OpenShell driver does not yet call this builder.e2e/chromium/README.md.Testing completed locally
chrome://sandboxverification.Remaining work / review decisions
ai-openshell/desktopand retaining the appropriate core-side changes.Checklist
Status: Draft, awaiting architecture and migration guidance. No claim of complete Chromium support.