Uh oh!
There was an error while loading. Please reload this page.
fix(agent-challenge): stop RO-rootfs on own_runner task containers - #59
Conversation
Task guests incorrectly inherited the DooD job-client --read-only posture, so verifier upload_tests failed with "mkdir: cannot create directory '/tests': Read-only file system" while the container was still running. Keep cap-drop/nnp/pids hardening; leave rootfs writable for harbor paths and apt-based test.sh. Wire DooD env into upload_tests/collect_verifier_dir.
📝 WalkthroughWalkthroughTask containers no longer use ChangesOwn runner runtime changes
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/challenges/agent-challenge/src/agent_challenge/evaluation/own_runner/container_builder.py (1)
298-321: 🔒 Security & Privacy | 🔵 TrivialDeliberate
--read-onlyremoval, well-justified and tested.The rationale (harbor paths
/tests,/logs/verifier,/solution,/appplus apt-basedtest.shneeding a writable rootfs) is sound, and the other hardening controls (cap-drop ALL,no-new-privileges, boundedpids-limit, writable/tmptmpfs) remain intact. This is directly validated bytest_hardening_run_args_does_not_force_readonly_rootfsandtest_task_container_allows_harbor_verifier_pathsin the companion test file.One thing worth keeping in mind operationally: this widens the writable surface for the container that runs task/agent-submitted code (previously RO). Since network isolation, cap-drop, and pids limits are unchanged and the container is short-lived and destroyed per task, this looks acceptable — just flagging it as a posture change worth being aware of if this container is ever reused for anything beyond the sanctioned harbor workflow.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/challenges/agent-challenge/src/agent_challenge/evaluation/own_runner/container_builder.py` around lines 298 - 321, The hardened task-container configuration intentionally omits --read-only to preserve writable harbor paths and package installation behavior. Keep hardening_run_args unchanged, including its existing capability, privilege, PID, tmpfs, and workspace-volume options, and retain the accompanying tests that validate the writable-rootfs posture.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@packages/challenges/agent-challenge/src/agent_challenge/evaluation/own_runner/container_builder.py`:
- Around line 298-321: The hardened task-container configuration intentionally
omits --read-only to preserve writable harbor paths and package installation
behavior. Keep hardening_run_args unchanged, including its existing capability,
privilege, PID, tmpfs, and workspace-volume options, and retain the accompanying
tests that validate the writable-rootfs posture.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f0218ff5-1416-4fa5-93c6-ef370c251fd6
📒 Files selected for processing (3)
packages/challenges/agent-challenge/src/agent_challenge/evaluation/own_runner/container_builder.pypackages/challenges/agent-challenge/src/agent_challenge/evaluation/own_runner/verifier_runner.pypackages/challenges/agent-challenge/tests/test_own_runner_isolation_invariants.py
Uh oh!
There was an error while loading. Please reload this page.
Summary
mkdir: cannot create directory '/tests': Read-only file system.--read-onlyposture.--read-onlyfrom task-guest hardening only; keep cap-drop ALL, no-new-privileges, pids-limit, tmpfs/tmp, and workspace volume.Symptom
After digest-manifest resolution shipped, verifier
upload_testsfailed while the container was still running:This blocked all scoring after bootstrap.
Root cause
own_runnertask guests incorrectly inherited the DooD job-client--read-onlyrootfs posture. Harbor paths and apt-basedtest.shneed a writable rootfs for/testsand related layout.Fix
--read-onlyfromhardening_run_argsfor task-guest containers.--cap-drop ALL,--security-opt no-new-privileges,--pids-limit, tmpfs/tmp, workspace volume mounts.upload_tests/collect_verifier_dirso verifier I/O still works under the broker.Security residual (honest)
Same-container agent+verifier means a malicious agent can still subvert the toolchain before tests run. That is inherent to harbor parity + apt-based
test.sh. A fresh-container verifier is the correct P0 follow-up. Product path remains host-trust unattested. Oracle: CONDITIONAL SHIP.Changes
packages/challenges/agent-challenge/src/agent_challenge/evaluation/own_runner/container_builder.pypackages/challenges/agent-challenge/src/agent_challenge/evaluation/own_runner/verifier_runner.pypackages/challenges/agent-challenge/tests/test_own_runner_isolation_invariants.pyCherry-pick of
587bb1ceonto currentmain(post PR #58 mergeb1cec36d). No unrelated commits.Test plan
base-masterpublished; in-image assert"--read-only" not in hardening_run_args()CI
Notes
Summary by CodeRabbit
Bug Fixes
Tests