fix(docker): enforce sandbox container runtime contract - #6121
Open
RaresKeY wants to merge 2 commits into
Open
Conversation
|
Changed-file classification: backend/runtime. Author-reported runtime / visual state
Checkboxes are author attestations. GitHub Actions results remain the execution evidence for CI; this check does not prove that a local command ran. This comment updates automatically when the description or changed files change. |
Open
3 tasks
This was referenced Aug 19, 2026
Open
RaresKeY
marked this pull request as ready for review
August 19, 2026 10:14
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
This focused deployment slice makes the sandbox container boundary explicit and fail-closed for the default, NVIDIA, and AMD Compose variants. It installs and verifies the Bubblewrap/helper runtime expected by the foundation slices, consumes the generated outer seccomp policy supplied by dependency PR #6119, applies the named AppArmor profile without privileged mode, host PID/networking, or an OCI
SYS_ADMINcapability, and runs a dropped-user boot self-test before the application starts. The AppArmor profile permits the namespaced Bubblewrap bootstrap required on supported Ubuntu Docker hosts; it does not grant the container a hostCAP_SYS_ADMINfallback.Target branch
dev, notmain. All PRs land indev;mainis curated by the maintainer at each release. If your PR is onmainby accident, click "Edit" on this PR and change the base.Linked Issue
Fixes #6117
Part of #6091
Part of #5815
The corresponding Docker/runtime slice of PR #5818 is the source context; this implementation was independently reworked for the supported container boundary.
Dependencies are the verified open draft PRs below, all still unmerged at their listed heads; this branch does not assume that any dependency is merged. PR #6119 canonically owns and provides
docker/seccomp/odysseus-bubblewrap.json; this PR consumes that path and deliberately does not duplicate it.55211d94cab1b7ce57dade43200d043bc525035c.b1a97c0eed02759f506da83b3a42fcd948faad24.a1a47d5b2b18e27c33a06403537221554fdbb29f.Type of Change
Checklist
devdocker compose uporuvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.How to Test
python3 -m pytest -q tests/test_container_runtime.py tests/test_gpu_compose_standalone.py; the standalone dependent branch reports 20 passed and 2 prerequisite-only skips because refactor(seccomp): extract trusted policy substrate #6119'ssecurity/seccompand generated profile are not indev.python3 security/seccomp/generate.py --check --verify-arches,make -C security/seccomp all,make -C security/egress check,sh -n docker/sandbox-self-test.sh docker/entrypoint.sh, and the integrated regression suite; the generated policy remains owned by refactor(seccomp): extract trusted policy substrate #6119, the helper builds pass, and the focused integrated suite reports 139 passed and 30 skipped.docker/apparmor/odysseus-sandboxon a supported Ubuntu Docker host, load it withapparmor_parser -r -W, verify it is enforcing, then rundocker compose configfor all three Compose variants anddocker compose up -d --build; the boot log must containodysseus-sandbox-self-test: sandbox and broker boundaries passedbefore the application starts.The secretless validation runner has no Docker daemon/CLI or AppArmor host tools, so actual image build, Compose resolution/startup, host profile loading, and end-to-end application startup were not run. The integrated full suite reported 5906 passed, 42 skipped, and three runner-environment failures: the review snapshot omits
.env.example, the DNS-disabled URL-join test also fails on the pinned dev basis, and the browser smoke test requiresnavigator/TTS support unavailable in the Node runner. These failures are outside this deployment slice. Because this is a dependent draft, its image/Trivy job cannot succeed againstdevuntil #6119 suppliessecurity/seccomp; the Dockerfile remains fail-closed and must be rebased and rechecked after #6119 lands.Visual / UI changes — REQUIRED if you touched anything that renders
Anything that changes what the UI looks like — buttons, icons, padding, colors, fonts, spacing, layout, CSS, HTML, SVG, or any
static/js/module that draws to the DOM — needs all of the following. PRs that change rendering without these WILL be closed.--red,--fg,--bg,--card,--border, etc.) — do not introduce new color values, font sizes, or spacing units.static/index.html) or plain text.Fira Code) for primary UI text. Don't override.Screenshots / clips
N/A — no UI changes.