Harden Docker task sandbox isolation and resource limits - #109
Merged
Conversation
Contributor
|
No new code issues found.
Sync reviewRe-reviewed through
Latest hardening also looks sound: best-effort reaper startup, per-network reconcile isolation, fail-open process-list reads, inspect-then-connect race handling, and idempotent egress No new actionable code issues found on this pass. |
Contributor
Author
|
Addressed all four review findings in
Validation:
|
…sandbox-isolation # Conflicts: # apps/controller/src/compute-providers/spawn-docker-worker.ts
Contributor
Author
|
Addressed the latest review findings in
Validation:
|
…sandbox-isolation # Conflicts: # deploy/coolify/docker-compose.yaml
…he sandbox reaper The new DOCKER_WORKER_* limit and egress variables were only added to the web env anchor in the production Compose file, so the controller (their sole consumer) always fell back to built-in defaults. That also made the documented DOCKER_WORKER_ALLOW_UNBOUNDED_DISK escape hatch a no-op on hosts whose storage driver cannot enforce --storage-opt size. Also hardens sandbox reconciliation: - controller startup no longer crashes when the initial sandbox sweep fails transiently (for example mid-rolling-deploy) - one unreconcilable task network no longer aborts the rest of the sweep - a running worker is never reaped when its process list cannot be read or its task-run label is unreadable; the next cycle retries - losing the inspect-then-connect race for a trusted service is treated as success instead of failing the spawn - egress blackhole routes use `ip route replace` so the helper script is idempotent
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
Testing
RUN_DOCKER_SANDBOX_INTEGRATION_TESTS=true pnpm --filter @roomote/controller exec vitest run src/compute-providers/__tests__/docker-sandbox-isolation.integration.test.tspnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/controller exec vitest runpnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/env exec vitest runpnpm lint:fastpnpm check-types:fastpnpm knipThe Docker integration test verifies enforced HostConfig limits, trusted-service reachability, sibling sandbox/preview/credential denial, immutable egress routes, and crash-recovery cleanup.