Repository navigation
Description
Ready: implementation plan (refined 2026-10-17 at 3dd7fa6)
The plan is in this comment, because the body has no room for it. It supersedes any text below that conflicts with it.
Context & Rationale
Both sandbox runners declare hardening as Docker SDK kwargs — cap_drop ALL, no-new-privileges, pids_limit 256, network_mode none (src/devops_cli/sandbox/engine.py:227-239, src/devops_cli/docker/sandbox.py:260-273); read_only and a noexec tmpfs exist only in the deploy engine (engine.py:234-235; the workload runner's read_only only sets the bind mode, docker/sandbox.py:254,264). Tests check those kwargs at three sites (tests/test_sandbox_lifecycle.py:311-315, tests/test_workload_sandbox.py:78-80,167-179), only against a mocked SDK. Nothing queries the engine: DockerEngineService (src/devops_cli/docker/engine.py:197) has no SecurityOptions accessor, and the two dry-run summaries disagree (commands/sandbox.py:183-188, docker/sandbox.py:155-172). vibes hit this failure: CISPolicyAuditor scored the policy 100.0/100, 8/8, while the engine enforced 0 of 8; the fix scored the engine about to run, named each unapplied control, and tested that the scores differ (examples/ephemeral-container-sandbox/sandbox.py:104,222-262, test_sandbox.py:206-231, observations/systems/19-self-consistency-is-not-conformance.md:27,115,132).
Scope & Deliverables
- Context & Rationale*: Both sandbox runners declare hardening as Docker SDK kwargs —
cap_drop ALL,no-new-privileges,pids_limit 256,network_mode none(src/devops_cli/sandbox/engine.py:227-239,src/devops_cli/docker/sandbox.py:260-273);read_onlyand anoexectmpfs exist only in the deploy engine (engine.py:234-235; the workload runner'sread_onlyonly sets the bind mode,docker/sandbox.py:254,264). Tests check those kwargs at three sites (tests/test_sandbox_lifecycle.py:311-315,tests/test_workload_sandbox.py:78-80,167-179), only against a mocked SDK. Nothing queries the engine:DockerEngineService(src/devops_cli/docker/engine.py:197) has noSecurityOptionsaccessor, and the two dry-run summaries disagree (commands/sandbox.py:183-188,docker/sandbox.py:155-172). vibes hit this failure:CISPolicyAuditorscored the policy 100.0/100, 8/8, while the engine enforced 0 of 8; the fix scored the engine about to run, named each unapplied control, and tested that the scores differ (examples/ephemeral-container-sandbox/sandbox.py:104,222-262,test_sandbox.py:206-231,observations/systems/19-self-consistency-is-not-conformance.md:27,115,132). - Deliverable*: A
devops sandbox auditcommand andsandbox_auditMCP tool besidesandbox_deploy(src/devops_cli/ai/mcp/server.py:1289,1336), with per-control columns DECLARED, ENGINE, ENFORCED. Three sequential PRs. PR1: DECLARED derives from the production_build_create_kwargs(sandbox/engine.py:207,docker/sandbox.py:252-273); both dry-runs read those kwargs, replacing the literal atcommands/sandbox.py:183-188. ENGINE comes from a newDockerEngineService.security_options()callingclient.info()['SecurityOptions']via thedockerSDK (pyproject.toml:24); an unreachable daemon reports 0 enforced plus the reason. PR2:--proberuns the runner's identical kwargs onDEFAULT_SANDBOX_IMAGE(config/defaults.py:641), recording EPERM/ENOSYS/success forio_uring_setup,unshare(CLONE_NEWUSER),ptrace,mount, non-loopbackconnect, writes outside/tmp//workspace, forks pastpids_limit; an unprobed control readsnot probed, never enforced. A mocked daemon reportingprofile=unconfinedmust lower ENFORCED with DECLARED constant. PR3: aseccomp_profilefield onSandboxDeployConfig(sandbox/models.py:360) andWorkloadSandboxConfig(docker/sandbox.py:46) reading an OCI profile, rejecting a missing orSCMP_ACT_ALLOWdefaultAction, passingsecurity_opt: ["seccomp=<profile JSON>"]. Do not port vibestools/seccomp_synthesizer.py: the engine's builtin profile is the maintained default-deny artifact (Measured); tighter profiles come from a maintained tracer (oci-seccomp-bpf-hook), audit-confirmed. The harness shell tool (ai/harness/shell.py:272, process-group isolation only) is listed enforcing no container control. - Constraint*: Reading kwargs and printing ENFORCED is the vibes 8/8 defect renamed; ENFORCED must come from a run against the kernel or say it did not run. Probe under the same network mode:
socket()succeeded inside--network none(Measured); test egress by reachability, not syscall. PR1–PR2 land before v0.3.2's Automated Triage & Sandbox Repro Validator, the first to run issue-supplied code here; PR3 may slip to v0.3.4 if milestone load forces a cut. The user's host is rootless Podman; test ENGINE against both option sets via mockedinfo(). - Measured*: Re-measured this session:
docker inforeported server version 29.8.1 with security optionsname=seccomp,profile=builtinandname=cgroupns, norootless.grep -c 'def test_'→ 37 (tests/test_sandbox_lifecycle.py) + 9 (tests/test_workload_sandbox.py). Run A,docker run --rm --pull=never --network none --cap-drop ALL --security-opt no-new-privileges:true --pids-limit 256 --read-only --tmpfs /tmp:size=64m,noexec debian:sid-slim perl -e '<syscall probe>'→io_uring_setupEPERM,unshare(CLONE_NEWUSER)EPERM,socket(AF_INET)fd 3. Run B, same plus--security-opt seccomp=unconfined→io_uring_setupfd 3,unshare0. io_uring is closed by an engine default devops-cli neither requests, records nor checks. - Source*: vibes
examples/ephemeral-container-sandbox/sandbox.py,examples/ephemeral-container-sandbox/syscall_filter.py,examples/ephemeral-container-sandbox/test_sandbox.py,tools/seccomp_synthesizer.py,observations/systems/19-self-consistency-is-not-conformance.md,docs/RETROSPECTIVE.md,AGENTS.md
Strategic Alignment
- Milestone:
v0.2.24(Reactive Workstation Command Center, Interactive TUI & Unified Operations Hub) - Roadmap Reference:
docs/ROADMAP.md
Update 2026-10-08: refinement
Both runners now take the policy's controls (sandbox/models.py:382-391; #592), so 'read_only exists only in the deploy engine' no longer holds. The workload dry run (docker/sandbox.py:146-163) still prints no controls; DECLARED comes from _build_create_kwargs in both runners. #1117 plans the same security_options() accessor; whichever lands first adds it. #798's change to the shared policy must keep noexec for the containers.
Proposed design
Problem statement
The sandbox runners declare security hardening as Docker SDK kwargs (cap_drop ALL, no-new-privileges, pids_limit 256, network_mode none), but nothing verifies what the engine actually enforces or what the kernel actually blocks. Tests check those kwargs only against a mocked SDK, the two dry-run summaries disagree, and a CISPolicyAuditor scored a policy 100/100 while the engine enforced 0 of 8 controls. This issue adds a devops sandbox audit command and sandbox_audit MCP tool that report per-control DECLARED (from production code), ENGINE (from docker info SecurityOptions), and ENFORCED (from runtime probes) columns, delivered across three sequential PRs.
Acceptance criteria
- Criterion 1:
devops sandbox auditcommand exists and prints a table with per-control columns DECLARED, ENGINE, and ENFORCED
Verification: Runuv run devops sandbox auditand confirm the output contains three column headers and at least one row per declared control (cap_drop, no-new-privileges, pids_limit, network_mode, read_only, noexec tmpfs). - Criterion 2:
sandbox_auditMCP tool is registered besidesandbox_deployin the FastMCP server
Verification: Runuv run devops ai mcp export-schemas(or inspectsrc/devops_cli/ai/mcp/server.py) and confirmsandbox_auditappears in the tool list adjacent tosandbox_deploy. - Criterion 3: DECLARED column derives from the production
_build_create_kwargsin both runners (sandbox/engine.py and docker/sandbox.py), not from a hardcoded literal
Verification: Unit test: patch_build_create_kwargsto return a modified kwarg set, run the audit, and assert the DECLARED column reflects the modified values. Confirmcommands/sandbox.py:183-188no longer contains a literal control list. - Criterion 4: Both dry-run summaries (commands/sandbox.py and docker/sandbox.py) read the same kwargs from
_build_create_kwargs
Verification: Runuv run devops sandbox deploy --dry-runanduv run devops docker sandbox --dry-runand confirm both print identical control sets derived from the same source. - Criterion 5: ENGINE column comes from a new
DockerEngineService.security_options()method that callsclient.info()['SecurityOptions']via the docker SDK
Verification: Unit test: mockclient.info()to return{'SecurityOptions': ['name=seccomp,profile=builtin', 'name=cgroupns']}and assert the ENGINE column shows seccomp=builtin. Confirm the method exists onDockerEngineServiceinsrc/devops_cli/docker/engine.py. - Criterion 6: An unreachable daemon reports 0 enforced controls plus the reason for the failure
Verification: Unit test: mockclient.info()to raise a connection error and assert the audit output shows 0 enforced and a human-readable reason string. - Criterion 7: A mocked daemon reporting
profile=unconfinedlowers ENFORCED while DECLARED stays constant
Verification: Unit test: mockclient.info()to return{'SecurityOptions': ['name=seccomp,profile=unconfined']}and assert the seccomp row shows DECLARED=yes, ENGINE=unconfined, ENFORCED=no (or 0), while other DECLARED rows remain unchanged. - Criterion 8:
--probeflag runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success for io_uring_setup, unshare(CLONE_NEWUSER), ptrace, mount, non-loopback connect, writes outside /tmp and /workspace, and forks past pids_limit
Verification: Integration test (skipped when no daemon): runuv run devops sandbox audit --probeagainst a live daemon and confirm each probed control shows a concrete result (EPERM, ENOSYS, or success) rather than a placeholder. - Criterion 9: An unprobed control reads
not probed, neverenforced
Verification: Unit test: run the audit without--probeand assert every ENFORCED cell that has no probe result reads exactlynot probed. - Criterion 10:
seccomp_profilefield on SandboxDeployConfig and WorkloadSandboxConfig reads an OCI profile, rejects a missing or SCMP_ACT_ALLOW defaultAction, and passessecurity_opt: ["seccomp="]
Verification: Unit test: setseccomp_profileto a valid OCI profile JSON and assert the create kwargs includesecurity_optwithseccomp=prefix. Set it to a profile withdefaultAction: SCMP_ACT_ALLOWand assert a ValidationError is raised. Set it to a missing file and assert a ValidationError. - Criterion 11: The harness shell tool (ai/harness/shell.py) is listed in the audit as enforcing no container control
Verification: Runuv run devops sandbox auditand confirm a row for the harness shell tool shows DECLARED=no, ENGINE=n/a, ENFORCED=no with a note about process-group isolation only.
Key questions
- How many PRs does this issue split into and what does each deliver?: Three sequential PRs. PR1:
devops sandbox auditcommand and MCP tool with DECLARED (from_build_create_kwargs) and ENGINE (fromsecurity_options()) columns, unified dry-run summaries, and theDockerEngineService.security_options()accessor. PR2:--probeflag that runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success per syscall, with unprobed controls readingnot probed. PR3:seccomp_profilefield on both config models reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passingsecurity_opt: ["seccomp="]. (proposed) [sources: src/devops_cli/sandbox/engine.py, src/devops_cli/docker/sandbox.py, src/devops_cli/docker/engine.py, src/devops_cli/ai/mcp/server.py] - What is the relationship with issue feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117, which plans the same
security_options()accessor?: Whichever of feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698 and feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117 lands first adds thesecurity_options()accessor; the other reuses it. They are not strictly sequential but must coordinate on the shared method inDockerEngineService. [sources: src/devops_cli/docker/engine.py] - What is the relationship with issue fix(security): the host sandbox declares a noexec /tmp it never applies #798 (noexec /tmp policy)?: fix(security): the host sandbox declares a noexec /tmp it never applies #798 is already delivered (Done in v0.2.32). Its change to the shared policy must keep
noexecfor the containers, which the audit's DECLARED column will reflect. No further work is needed from feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698 beyond reading the existing policy. [sources: docs/ROADMAP.md] - Should the vibes
tools/seccomp_synthesizer.pybe ported into devops-cli?: No. The engine's builtin seccomp profile is the maintained default-deny artifact. Tighter profiles come from a maintained tracer (oci-seccomp-bpf-hook), audit-confirmed. PR3 reads an OCI profile file rather than synthesizing one. (proposed) [sources: src/devops_cli/sandbox/models.py, src/devops_cli/docker/sandbox.py] - Which image does the
--probeflag use?: DEFAULT_SANDBOX_IMAGE fromconfig/defaults.py:641. [sources: src/devops_cli/config/defaults.py] - How is network egress tested in the probe?: By reachability, not by syscall. Measured:
socket(AF_INET)succeeded inside--network none, so the probe must attempt a non-loopback connect and check whether it reaches a destination, rather than checking whether thesocket()syscall itself is blocked. [sources: src/devops_cli/docker/sandbox.py] - What is the milestone and timing constraint?: Milestone v0.2.24 (Reactive Workstation Command Center). PR1 and PR2 must land before v0.3.2's Automated Triage & Sandbox Repro Validator, the first feature to run issue-supplied code in the sandbox. PR3 may slip to v0.3.4 if milestone load forces a cut. (proposed) [sources: docs/ROADMAP.md]
- What is the testing environment constraint?: The user's host is rootless Podman. ENGINE must be tested against both option sets (builtin and unconfined) via mocked
info()responses, not against a live daemon, to avoid coupling tests to a specific container runtime. [sources: src/devops_cli/docker/engine.py, tests/test_workload_sandbox.py]
Fit
Needs splitting into 3 items:
- PR1:
devops sandbox auditcommand andsandbox_auditMCP tool with DECLARED and ENGINE columns, unified dry-run summaries reading_build_create_kwargs, andDockerEngineService.security_options()accessor - PR2:
--probeflag running the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE, recording EPERM/ENOSYS/success per syscall, with unprobed controls readingnot probed - PR3:
seccomp_profilefield on SandboxDeployConfig and WorkloadSandboxConfig reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passingsecurity_opt: ["seccomp="]
Suspected block
None.
Dependencies
#1117
[end-marker]
Proposed design
Problem statement
The sandbox runners declare security hardening as Docker SDK kwargs (cap_drop ALL, no-new-privileges, pids_limit 256, network_mode none), but nothing verifies what the engine actually enforces or what the kernel actually blocks. Tests check those kwargs only against a mocked SDK, the two dry-run summaries disagree, and a CISPolicyAuditor scored a policy 100/100 while the engine enforced 0 of 8 controls. This issue adds a devops sandbox audit command and sandbox_audit MCP tool that report per-control DECLARED (from production code), ENGINE (from docker info SecurityOptions), and ENFORCED (from runtime probes) columns, delivered across three sequential PRs.
Acceptance criteria
- Criterion 1:
devops sandbox auditcommand exists and prints a table with per-control columns DECLARED, ENGINE, and ENFORCED
Verification: Runuv run devops sandbox auditand confirm the output contains three column headers and at least one row per declared control (cap_drop, no-new-privileges, pids_limit, network_mode, read_only, noexec tmpfs). - Criterion 2:
sandbox_auditMCP tool is registered besidesandbox_deployin the FastMCP server
Verification: Runuv run devops ai mcp export-schemas(or inspectsrc/devops_cli/ai/mcp/server.py) and confirmsandbox_auditappears in the tool list adjacent tosandbox_deploy. - Criterion 3: DECLARED column derives from the production
_build_create_kwargsin both runners (sandbox/engine.py and docker/sandbox.py), not from a hardcoded literal
Verification: Unit test: patch_build_create_kwargsto return a modified kwarg set, run the audit, and assert the DECLARED column reflects the modified values. Confirmcommands/sandbox.py:183-188no longer contains a literal control list. - Criterion 4: Both dry-run summaries (commands/sandbox.py and docker/sandbox.py) read the same kwargs from
_build_create_kwargs
Verification: Runuv run devops sandbox deploy --dry-runanduv run devops docker sandbox --dry-runand confirm both print identical control sets derived from the same source. - Criterion 5: ENGINE column comes from a new
DockerEngineService.security_options()method that callsclient.info()['SecurityOptions']via the docker SDK
Verification: Unit test: mockclient.info()to return{'SecurityOptions': ['name=seccomp,profile=builtin', 'name=cgroupns']}and assert the ENGINE column shows seccomp=builtin. Confirm the method exists onDockerEngineServiceinsrc/devops_cli/docker/engine.py. - Criterion 6: An unreachable daemon reports 0 enforced controls plus the reason for the failure
Verification: Unit test: mockclient.info()to raise a connection error and assert the audit output shows 0 enforced and a human-readable reason string. - Criterion 7: A mocked daemon reporting
profile=unconfinedlowers ENFORCED while DECLARED stays constant
Verification: Unit test: mockclient.info()to return{'SecurityOptions': ['name=seccomp,profile=unconfined']}and assert the seccomp row shows DECLARED=yes, ENGINE=unconfined, ENFORCED=no (or 0), while other DECLARED rows remain unchanged. - Criterion 8:
--probeflag runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success for io_uring_setup, unshare(CLONE_NEWUSER), ptrace, mount, non-loopback connect, writes outside /tmp and /workspace, and forks past pids_limit
Verification: Integration test (skipped when no daemon): runuv run devops sandbox audit --probeagainst a live daemon and confirm each probed control shows a concrete result (EPERM, ENOSYS, or success) rather than a placeholder. - Criterion 9: An unprobed control reads
not probed, neverenforced
Verification: Unit test: run the audit without--probeand assert every ENFORCED cell that has no probe result reads exactlynot probed. - Criterion 10:
seccomp_profilefield on SandboxDeployConfig and WorkloadSandboxConfig reads an OCI profile, rejects a missing or SCMP_ACT_ALLOW defaultAction, and passessecurity_opt: ["seccomp="]
Verification: Unit test: setseccomp_profileto a valid OCI profile JSON and assert the create kwargs includesecurity_optwithseccomp=prefix. Set it to a profile withdefaultAction: SCMP_ACT_ALLOWand assert a ValidationError is raised. Set it to a missing file and assert a ValidationError. - Criterion 11: The harness shell tool (ai/harness/shell.py) is listed in the audit as enforcing no container control
Verification: Runuv run devops sandbox auditand confirm a row for the harness shell tool shows DECLARED=no, ENGINE=n/a, ENFORCED=no with a note about process-group isolation only.
Key questions
- How many PRs does this issue split into and what does each deliver?: Three sequential PRs. PR1:
devops sandbox auditcommand and MCP tool with DECLARED (from_build_create_kwargs) and ENGINE (fromsecurity_options()) columns, unified dry-run summaries, and theDockerEngineService.security_options()accessor. PR2:--probeflag that runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success per syscall, with unprobed controls readingnot probed. PR3:seccomp_profilefield on both config models reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passingsecurity_opt: ["seccomp="]. (proposed) [sources: src/devops_cli/sandbox/engine.py, src/devops_cli/docker/sandbox.py, src/devops_cli/docker/engine.py, src/devops_cli/ai/mcp/server.py] - What is the relationship with issue feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117, which plans the same
security_options()accessor?: Whichever of feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698 and feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117 lands first adds thesecurity_options()accessor; the other reuses it. They are not strictly sequential but must coordinate on the shared method inDockerEngineService. (proposed) [sources: src/devops_cli/docker/engine.py] - What is the relationship with issue fix(security): the host sandbox declares a noexec /tmp it never applies #798 (noexec /tmp policy)?: fix(security): the host sandbox declares a noexec /tmp it never applies #798 is already delivered (Done in v0.2.32). Its change to the shared policy must keep
noexecfor the containers, which the audit's DECLARED column will reflect. No further work is needed from feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698 beyond reading the existing policy. [sources: docs/ROADMAP.md] - Should the vibes
tools/seccomp_synthesizer.pybe ported into devops-cli?: No. The engine's builtin seccomp profile is the maintained default-deny artifact. Tighter profiles come from a maintained tracer (oci-seccomp-bpf-hook), audit-confirmed. PR3 reads an OCI profile file rather than synthesizing one. (proposed) [sources: src/devops_cli/sandbox/models.py, src/devops_cli/docker/sandbox.py] - Which image does the
--probeflag use?: DEFAULT_SANDBOX_IMAGE fromconfig/defaults.py:641. [sources: src/devops_cli/config/defaults.py] - How is network egress tested in the probe?: By reachability, not by syscall. Measured:
socket(AF_INET)succeeded inside--network none, so the probe must attempt a non-loopback connect and check whether it reaches a destination, rather than checking whether thesocket()syscall itself is blocked. (proposed) [sources: src/devops_cli/docker/sandbox.py] - What is the milestone and timing constraint?: Milestone v0.2.34 (per the generated roadmap). PR1 and PR2 must land before v0.3.2's Automated Triage & Sandbox Repro Validator, the first feature to run issue-supplied code in the sandbox. PR3 may slip to v0.3.4 if milestone load forces a cut. [sources: docs/ROADMAP.md]
- What is the testing environment constraint?: The user's host is rootless Podman. ENGINE must be tested against both option sets (builtin and unconfined) via mocked
info()responses, not against a live daemon, to avoid coupling tests to a specific container runtime. [sources: src/devops_cli/docker/engine.py, tests/test_workload_sandbox.py]
Fit
Needs splitting into 3 items:
- PR1:
devops sandbox auditcommand andsandbox_auditMCP tool with DECLARED and ENGINE columns, unified dry-run summaries reading_build_create_kwargs, andDockerEngineService.security_options()accessor - PR2:
--probeflag running the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE, recording EPERM/ENOSYS/success per syscall, with unprobed controls readingnot probed - PR3:
seccomp_profilefield on SandboxDeployConfig and WorkloadSandboxConfig reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passingsecurity_opt: ["seccomp="]
Suspected block
None.
Dependencies
#1117
[end-marker]
Proposed design
Problem statement
The sandbox runners declare security hardening as Docker SDK kwargs (cap_drop ALL, no-new-privileges, pids_limit 256, network_mode none), but nothing verifies what the engine actually enforces or what the kernel actually blocks. Tests check those kwargs only against a mocked SDK, the two dry-run summaries disagree, and a CISPolicyAuditor scored a policy 100/100 while the engine enforced 0 of 8 controls. This issue adds a devops sandbox audit command and sandbox_audit MCP tool that report per-control DECLARED (from production code), ENGINE (from docker info SecurityOptions), and ENFORCED (from runtime probes) columns, delivered across three sequential PRs.
Acceptance criteria
- Criterion 1: devops sandbox audit command exists and prints a table with per-control columns DECLARED, ENGINE, and ENFORCED
Verification: Runuv run devops sandbox auditand confirm the output contains three column headers and at least one row per declared control (cap_drop, no-new-privileges, pids_limit, network_mode, read_only, noexec tmpfs). - Criterion 2: sandbox_audit MCP tool is registered beside sandbox_deploy in the FastMCP server
Verification: Runuv run devops ai mcp export-schemas(or inspect src/devops_cli/ai/mcp/server.py) and confirm sandbox_audit appears in the tool list adjacent to sandbox_deploy. - Criterion 3: DECLARED column derives from the production _build_create_kwargs in both runners, not from a hardcoded literal
Verification: Unit test: patch _build_create_kwargs to return a modified kwarg set, run the audit, and assert the DECLARED column reflects the modified values. Confirm commands/sandbox.py no longer contains a literal control list. - Criterion 4: Both dry-run summaries (commands/sandbox.py and docker/sandbox.py) read the same kwargs from _build_create_kwargs
Verification: Runuv run devops sandbox deploy --dry-runanduv run devops docker sandbox --dry-runand confirm both print identical control sets derived from the same source. - Criterion 5: ENGINE column comes from a new DockerEngineService.security_options() method that calls client.info()['SecurityOptions'] via the docker SDK
Verification: Unit test: mock client.info() to return {'SecurityOptions': ['name=seccomp,profile=builtin', 'name=cgroupns']} and assert the ENGINE column shows seccomp=builtin. Confirm the method exists on DockerEngineService in src/devops_cli/docker/engine.py. - Criterion 6: An unreachable daemon reports 0 enforced controls plus the reason for the failure
Verification: Unit test: mock client.info() to raise a connection error and assert the audit output shows 0 enforced and a human-readable reason string. - Criterion 7: A mocked daemon reporting profile=unconfined lowers ENFORCED while DECLARED stays constant
Verification: Unit test: mock client.info() to return {'SecurityOptions': ['name=seccomp,profile=unconfined']} and assert the seccomp row shows DECLARED=yes, ENGINE=unconfined, ENFORCED=no, while other DECLARED rows remain unchanged. - Criterion 8: --probe flag runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success for io_uring_setup, unshare(CLONE_NEWUSER), ptrace, mount, non-loopback connect, writes outside /tmp and /workspace, and forks past pids_limit
Verification: Integration test (skipped when no daemon): runuv run devops sandbox audit --probeagainst a live daemon and confirm each probed control shows a concrete result (EPERM, ENOSYS, or success) rather than a placeholder. - Criterion 9: An unprobed control reads 'not probed', never 'enforced'
Verification: Unit test: run the audit without --probe and assert every ENFORCED cell that has no probe result reads exactly 'not probed'. - Criterion 10: seccomp_profile field on SandboxDeployConfig and WorkloadSandboxConfig reads an OCI profile, rejects a missing or SCMP_ACT_ALLOW defaultAction, and passes security_opt with seccomp= prefix
Verification: Unit test: set seccomp_profile to a valid OCI profile JSON and assert the create kwargs include security_opt with seccomp= prefix. Set it to a profile with defaultAction SCMP_ACT_ALLOW and assert a ValidationError is raised. Set it to a missing file and assert a ValidationError. - Criterion 11: The harness shell tool (ai/harness/shell.py) is listed in the audit as enforcing no container control
Verification: Runuv run devops sandbox auditand confirm a row for the harness shell tool shows DECLARED=no, ENGINE=n/a, ENFORCED=no with a note about process-group isolation only.
Key questions
- How many PRs does this issue split into and what does each deliver?: Three sequential PRs. PR1: devops sandbox audit command and MCP tool with DECLARED (from _build_create_kwargs) and ENGINE (from security_options()) columns, unified dry-run summaries, and the DockerEngineService.security_options() accessor. PR2: --probe flag that runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success per syscall, with unprobed controls reading 'not probed'. PR3: seccomp_profile field on both config models reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passing security_opt with seccomp= prefix. (proposed) [sources: src/devops_cli/sandbox/engine.py, src/devops_cli/docker/sandbox.py, src/devops_cli/docker/engine.py, src/devops_cli/ai/mcp/server.py]
- What is the relationship with issue feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117, which plans the same security_options() accessor?: Whichever of feat(cli): sandbox enforcement audit declared vs engine vs enforced (
devops sandbox audit) #698 and feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117 lands first adds the security_options() accessor; the other reuses it. They are not strictly sequential but must coordinate on the shared method in DockerEngineService. (proposed) [sources: src/devops_cli/docker/engine.py] - What is the relationship with issue fix(security): the host sandbox declares a noexec /tmp it never applies #798 (noexec /tmp policy)?: fix(security): the host sandbox declares a noexec /tmp it never applies #798 is already delivered (Done in v0.2.32). Its change to the shared policy must keep noexec for the containers, which the audit's DECLARED column will reflect. No further work is needed from feat(cli): sandbox enforcement audit declared vs engine vs enforced (
devops sandbox audit) #698 beyond reading the existing policy. [sources: docs/ROADMAP.md] - Should the vibes tools/seccomp_synthesizer.py be ported into devops-cli?: No. The engine's builtin seccomp profile is the maintained default-deny artifact. Tighter profiles come from a maintained tracer (oci-seccomp-bpf-hook), audit-confirmed. PR3 reads an OCI profile file rather than synthesizing one. (proposed) [sources: src/devops_cli/sandbox/models.py, src/devops_cli/docker/sandbox.py]
- Which image does the --probe flag use?: DEFAULT_SANDBOX_IMAGE from config/defaults.py:641. [sources: src/devops_cli/config/defaults.py]
- How is network egress tested in the probe?: By reachability, not by syscall. Measured: socket(AF_INET) succeeded inside --network none, so the probe must attempt a non-loopback connect and check whether it reaches a destination, rather than checking whether the socket() syscall itself is blocked. (proposed) [sources: src/devops_cli/docker/sandbox.py]
- What is the milestone and timing constraint?: Milestone v0.2.34 (per the generated roadmap). PR1 and PR2 must land before v0.3.2's Automated Triage & Sandbox Repro Validator, the first feature to run issue-supplied code in the sandbox. PR3 may slip to v0.3.4 if milestone load forces a cut. [sources: docs/ROADMAP.md]
- What is the testing environment constraint?: The user's host is rootless Podman. ENGINE must be tested against both option sets (builtin and unconfined) via mocked info() responses, not against a live daemon, to avoid coupling tests to a specific container runtime. (proposed) [sources: src/devops_cli/docker/engine.py, tests/test_workload_sandbox.py]
Fit
Needs splitting into 3 items:
- PR1: devops sandbox audit command and sandbox_audit MCP tool with DECLARED and ENGINE columns, unified dry-run summaries reading _build_create_kwargs, and DockerEngineService.security_options() accessor
- PR2: --probe flag running the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE, recording EPERM/ENOSYS/success per syscall, with unprobed controls reading 'not probed'
- PR3: seccomp_profile field on SandboxDeployConfig and WorkloadSandboxConfig reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passing security_opt with seccomp= prefix
Suspected block
None.
Dependencies
#1117
[end-marker]
Proposed design
Problem statement
The sandbox runners declare security hardening as Docker SDK kwargs (cap_drop ALL, no-new-privileges, pids_limit 256, network_mode none), but nothing verifies what the engine actually enforces or what the kernel actually blocks. Tests check those kwargs only against a mocked SDK, the two dry-run summaries disagree, and a CISPolicyAuditor scored a policy 100/100 while the engine enforced 0 of 8 controls. This issue adds a devops sandbox audit command and sandbox_audit MCP tool that report per-control DECLARED (from production code), ENGINE (from docker info SecurityOptions), and ENFORCED (from runtime probes) columns, delivered across three sequential PRs.
Acceptance criteria
- Criterion 1: devops sandbox audit command exists and prints a table with per-control columns DECLARED, ENGINE, and ENFORCED
Verification: Runuv run devops sandbox auditand confirm the output contains three column headers and at least one row per declared control (cap_drop, no-new-privileges, pids_limit, network_mode, read_only, noexec tmpfs). - Criterion 2: sandbox_audit MCP tool is registered beside sandbox_deploy in the FastMCP server
Verification: Runuv run devops ai mcp export-schemas(or inspect src/devops_cli/ai/mcp/server.py) and confirm sandbox_audit appears in the tool list adjacent to sandbox_deploy. - Criterion 3: DECLARED column derives from the production _build_create_kwargs in both runners, not from a hardcoded literal
Verification: Unit test: patch _build_create_kwargs to return a modified kwarg set, run the audit, and assert the DECLARED column reflects the modified values. Confirm commands/sandbox.py no longer contains a literal control list. - Criterion 4: Both dry-run summaries (commands/sandbox.py and docker/sandbox.py) read the same kwargs from _build_create_kwargs
Verification: Runuv run devops sandbox deploy --dry-runanduv run devops docker sandbox --dry-runand confirm both print identical control sets derived from the same source. - Criterion 5: ENGINE column comes from a new DockerEngineService.security_options() method that calls client.info()['SecurityOptions'] via the docker SDK
Verification: Unit test: mock client.info() to return {'SecurityOptions': ['name=seccomp,profile=builtin', 'name=cgroupns']} and assert the ENGINE column shows seccomp=builtin. Confirm the method exists on DockerEngineService in src/devops_cli/docker/engine.py. - Criterion 6: An unreachable daemon reports 0 enforced controls plus the reason for the failure
Verification: Unit test: mock client.info() to raise a connection error and assert the audit output shows 0 enforced and a human-readable reason string. - Criterion 7: A mocked daemon reporting profile=unconfined lowers ENFORCED while DECLARED stays constant
Verification: Unit test: mock client.info() to return {'SecurityOptions': ['name=seccomp,profile=unconfined']} and assert the seccomp row shows DECLARED=yes, ENGINE=unconfined, ENFORCED=no, while other DECLARED rows remain unchanged. - Criterion 8: --probe flag runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success for io_uring_setup, unshare(CLONE_NEWUSER), ptrace, mount, non-loopback connect, writes outside /tmp and /workspace, and forks past pids_limit
Verification: Integration test (skipped when no daemon): runuv run devops sandbox audit --probeagainst a live daemon and confirm each probed control shows a concrete result (EPERM, ENOSYS, or success) rather than a placeholder. - Criterion 9: An unprobed control reads 'not probed', never 'enforced'
Verification: Unit test: run the audit without --probe and assert every ENFORCED cell that has no probe result reads exactly 'not probed'. - Criterion 10: seccomp_profile field on SandboxDeployConfig and WorkloadSandboxConfig reads an OCI profile, rejects a missing or SCMP_ACT_ALLOW defaultAction, and passes security_opt with seccomp= prefix
Verification: Unit test: set seccomp_profile to a valid OCI profile JSON and assert the create kwargs include security_opt with seccomp= prefix. Set it to a profile with defaultAction SCMP_ACT_ALLOW and assert a ValidationError is raised. Set it to a missing file and assert a ValidationError. - Criterion 11: The harness shell tool (ai/harness/shell.py) is listed in the audit as enforcing no container control
Verification: Runuv run devops sandbox auditand confirm a row for the harness shell tool shows DECLARED=no, ENGINE=n/a, ENFORCED=no with a note about process-group isolation only.
Key questions
- How many PRs does this issue split into and what does each deliver?: Three sequential PRs. PR1: devops sandbox audit command and MCP tool with DECLARED (from _build_create_kwargs) and ENGINE (from security_options()) columns, unified dry-run summaries, and the DockerEngineService.security_options() accessor. PR2: --probe flag that runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success per syscall, with unprobed controls reading 'not probed'. PR3: seccomp_profile field on both config models reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passing security_opt with seccomp= prefix. (proposed) [sources: src/devops_cli/sandbox/engine.py, src/devops_cli/docker/sandbox.py, src/devops_cli/docker/engine.py, src/devops_cli/ai/mcp/server.py]
- What is the relationship with issue feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117, which plans the same security_options() accessor?: Whichever of feat(cli): sandbox enforcement audit declared vs engine vs enforced (
devops sandbox audit) #698 and feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117 lands first adds the security_options() accessor; the other reuses it. They are not strictly sequential but must coordinate on the shared method in DockerEngineService. (proposed) [sources: src/devops_cli/docker/engine.py] - What is the relationship with issue fix(security): the host sandbox declares a noexec /tmp it never applies #798 (noexec /tmp policy)?: fix(security): the host sandbox declares a noexec /tmp it never applies #798 is already delivered (Done in v0.2.32). Its change to the shared policy must keep noexec for the containers, which the audit's DECLARED column will reflect. No further work is needed from feat(cli): sandbox enforcement audit declared vs engine vs enforced (
devops sandbox audit) #698 beyond reading the existing policy. [sources: docs/ROADMAP.md] - Should the vibes tools/seccomp_synthesizer.py be ported into devops-cli?: No. The engine's builtin seccomp profile is the maintained default-deny artifact. Tighter profiles come from a maintained tracer (oci-seccomp-bpf-hook), audit-confirmed. PR3 reads an OCI profile file rather than synthesizing one. (proposed) [sources: src/devops_cli/sandbox/models.py, src/devops_cli/docker/sandbox.py]
- Which image does the --probe flag use?: DEFAULT_SANDBOX_IMAGE from config/defaults.py:641. [sources: src/devops_cli/config/defaults.py]
- How is network egress tested in the probe?: By reachability, not by syscall. Measured: socket(AF_INET) succeeded inside --network none, so the probe must attempt a non-loopback connect and check whether it reaches a destination, rather than checking whether the socket() syscall itself is blocked. (proposed) [sources: src/devops_cli/docker/sandbox.py]
- What is the milestone and timing constraint?: Milestone v0.2.34 (per the generated roadmap). PR1 and PR2 must land before v0.3.2's Automated Triage & Sandbox Repro Validator, the first feature to run issue-supplied code in the sandbox. PR3 may slip to v0.3.4 if milestone load forces a cut. [sources: docs/ROADMAP.md]
- What is the testing environment constraint?: The user's host is rootless Podman. ENGINE must be tested against both option sets (builtin and unconfined) via mocked info() responses, not against a live daemon, to avoid coupling tests to a specific container runtime. [sources: src/devops_cli/docker/engine.py, tests/test_workload_sandbox.py]
Fit
Needs splitting into 3 items:
- PR1: devops sandbox audit command and sandbox_audit MCP tool with DECLARED and ENGINE columns, unified dry-run summaries reading _build_create_kwargs, and DockerEngineService.security_options() accessor
- PR2: --probe flag running the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE, recording EPERM/ENOSYS/success per syscall, with unprobed controls reading 'not probed'
- PR3: seccomp_profile field on SandboxDeployConfig and WorkloadSandboxConfig reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passing security_opt with seccomp= prefix
Suspected block
None.
Dependencies
#1117
[end-marker]
Proposed design
Problem statement
The sandbox runners declare security hardening as Docker SDK kwargs (cap_drop ALL, no-new-privileges, pids_limit 256, network_mode none), but nothing verifies what the engine actually enforces or what the kernel actually blocks. Tests check those kwargs only against a mocked SDK, the two dry-run summaries disagree, and a CISPolicyAuditor scored a policy 100/100 while the engine enforced 0 of 8 controls. This issue adds a devops sandbox audit command and sandbox_audit MCP tool that report per-control DECLARED (from production code), ENGINE (from docker info SecurityOptions), and ENFORCED (from runtime probes) columns, delivered across three sequential PRs.
Acceptance criteria
- Criterion 1: devops sandbox audit command exists and prints a table with per-control columns DECLARED, ENGINE, and ENFORCED
Verification: Runuv run devops sandbox auditand confirm the output contains three column headers and at least one row per declared control (cap_drop, no-new-privileges, pids_limit, network_mode, read_only, noexec tmpfs). - Criterion 2: sandbox_audit MCP tool is registered beside sandbox_deploy in the FastMCP server
Verification: Runuv run devops ai mcp export-schemas(or inspect src/devops_cli/ai/mcp/server.py) and confirm sandbox_audit appears in the tool list adjacent to sandbox_deploy. - Criterion 3: DECLARED column derives from the production _build_create_kwargs in both runners, not from a hardcoded literal
Verification: Unit test: patch _build_create_kwargs to return a modified kwarg set, run the audit, and assert the DECLARED column reflects the modified values. Confirm commands/sandbox.py no longer contains a literal control list. - Criterion 4: Both dry-run summaries (commands/sandbox.py and docker/sandbox.py) read the same kwargs from _build_create_kwargs
Verification: Runuv run devops sandbox deploy --dry-runanduv run devops docker sandbox --dry-runand confirm both print identical control sets derived from the same source. - Criterion 5: ENGINE column comes from a new DockerEngineService.security_options() method that calls client.info()['SecurityOptions'] via the docker SDK
Verification: Unit test: mock client.info() to return {'SecurityOptions': ['name=seccomp,profile=builtin', 'name=cgroupns']} and assert the ENGINE column shows seccomp=builtin. Confirm the method exists on DockerEngineService in src/devops_cli/docker/engine.py. - Criterion 6: An unreachable daemon reports 0 enforced controls plus the reason for the failure
Verification: Unit test: mock client.info() to raise a connection error and assert the audit output shows 0 enforced and a human-readable reason string. - Criterion 7: A mocked daemon reporting profile=unconfined lowers ENFORCED while DECLARED stays constant
Verification: Unit test: mock client.info() to return {'SecurityOptions': ['name=seccomp,profile=unconfined']} and assert the seccomp row shows DECLARED=yes, ENGINE=unconfined, ENFORCED=no, while other DECLARED rows remain unchanged. - Criterion 8: --probe flag runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success for io_uring_setup, unshare(CLONE_NEWUSER), ptrace, mount, non-loopback connect, writes outside /tmp and /workspace, and forks past pids_limit
Verification: Integration test (skipped when no daemon): runuv run devops sandbox audit --probeagainst a live daemon and confirm each probed control shows a concrete result (EPERM, ENOSYS, or success) rather than a placeholder. - Criterion 9: An unprobed control reads 'not probed', never 'enforced'
Verification: Unit test: run the audit without --probe and assert every ENFORCED cell that has no probe result reads exactly 'not probed'. - Criterion 10: seccomp_profile field on SandboxDeployConfig and WorkloadSandboxConfig reads an OCI profile, rejects a missing or SCMP_ACT_ALLOW defaultAction, and passes security_opt with seccomp= prefix
Verification: Unit test: set seccomp_profile to a valid OCI profile JSON and assert the create kwargs include security_opt with seccomp= prefix. Set it to a profile with defaultAction SCMP_ACT_ALLOW and assert a ValidationError is raised. Set it to a missing file and assert a ValidationError. - Criterion 11: The harness shell tool (ai/harness/shell.py) is listed in the audit as enforcing no container control
Verification: Runuv run devops sandbox auditand confirm a row for the harness shell tool shows DECLARED=no, ENGINE=n/a, ENFORCED=no with a note about process-group isolation only.
Key questions
- How many PRs does this issue split into and what does each deliver?: Three sequential PRs. PR1: devops sandbox audit command and MCP tool with DECLARED (from _build_create_kwargs) and ENGINE (from security_options()) columns, unified dry-run summaries, and the DockerEngineService.security_options() accessor. PR2: --probe flag that runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success per syscall, with unprobed controls reading 'not probed'. PR3: seccomp_profile field on both config models reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passing security_opt with seccomp= prefix. (proposed) [sources: src/devops_cli/sandbox/engine.py, src/devops_cli/docker/sandbox.py, src/devops_cli/docker/engine.py, src/devops_cli/ai/mcp/server.py]
- What is the relationship with issue feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117, which plans the same security_options() accessor?: Whichever of feat(cli): sandbox enforcement audit declared vs engine vs enforced (
devops sandbox audit) #698 and feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117 lands first adds the security_options() accessor; the other reuses it. They are not strictly sequential but must coordinate on the shared method in DockerEngineService. (proposed) [sources: src/devops_cli/docker/engine.py] - What is the relationship with issue fix(security): the host sandbox declares a noexec /tmp it never applies #798 (noexec /tmp policy)?: fix(security): the host sandbox declares a noexec /tmp it never applies #798 is already delivered (Done in v0.2.32). Its change to the shared policy must keep noexec for the containers, which the audit's DECLARED column will reflect. No further work is needed from feat(cli): sandbox enforcement audit declared vs engine vs enforced (
devops sandbox audit) #698 beyond reading the existing policy. [sources: docs/ROADMAP.md] - Should the vibes tools/seccomp_synthesizer.py be ported into devops-cli?: No. The engine's builtin seccomp profile is the maintained default-deny artifact. Tighter profiles come from a maintained tracer (oci-seccomp-bpf-hook), audit-confirmed. PR3 reads an OCI profile file rather than synthesizing one. (proposed) [sources: src/devops_cli/sandbox/models.py, src/devops_cli/docker/sandbox.py]
- Which image does the --probe flag use?: DEFAULT_SANDBOX_IMAGE from config/defaults.py:641. [sources: src/devops_cli/config/defaults.py]
- How is network egress tested in the probe?: By reachability, not by syscall. Measured: socket(AF_INET) succeeded inside --network none, so the probe must attempt a non-loopback connect and check whether it reaches a destination, rather than checking whether the socket() syscall itself is blocked. (proposed) [sources: src/devops_cli/docker/sandbox.py]
- What is the milestone and timing constraint?: Milestone v0.2.34 (per the generated roadmap). PR1 and PR2 must land before v0.3.2's Automated Triage & Sandbox Repro Validator, the first feature to run issue-supplied code in the sandbox. PR3 may slip to v0.3.4 if milestone load forces a cut. [sources: docs/ROADMAP.md]
- What is the testing environment constraint?: The user's host is rootless Podman. ENGINE must be tested against both option sets (builtin and unconfined) via mocked info() responses, not against a live daemon, to avoid coupling tests to a specific container runtime. (proposed) [sources: src/devops_cli/docker/engine.py, tests/test_workload_sandbox.py]
Fit
Needs splitting into 3 items:
- PR1: devops sandbox audit command and sandbox_audit MCP tool with DECLARED and ENGINE columns, unified dry-run summaries reading _build_create_kwargs, and DockerEngineService.security_options() accessor
- PR2: --probe flag running the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE, recording EPERM/ENOSYS/success per syscall, with unprobed controls reading 'not probed'
- PR3: seccomp_profile field on SandboxDeployConfig and WorkloadSandboxConfig reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passing security_opt with seccomp= prefix
Suspected block
None.
Dependencies
#1117
[end-marker]
Proposed design
Problem statement
The sandbox runners declare security hardening as Docker SDK kwargs (cap_drop ALL, no-new-privileges, pids_limit 256, network_mode none), but nothing verifies what the engine actually enforces or what the kernel actually blocks. Tests check those kwargs only against a mocked SDK, the two dry-run summaries disagree, and a CISPolicyAuditor scored a policy 100/100 while the engine enforced 0 of 8 controls. This issue adds a devops sandbox audit command and sandbox_audit MCP tool that report per-control DECLARED (from production code), ENGINE (from docker info SecurityOptions), and ENFORCED (from runtime probes) columns, delivered across three sequential PRs.
Acceptance criteria
- Criterion 1: devops sandbox audit command exists and prints a table with per-control columns DECLARED, ENGINE, and ENFORCED
Verification: Runuv run devops sandbox auditand confirm the output contains three column headers and at least one row per declared control (cap_drop, no-new-privileges, pids_limit, network_mode, read_only, noexec tmpfs). - Criterion 2: sandbox_audit MCP tool is registered beside sandbox_deploy in the FastMCP server
Verification: Runuv run devops ai mcp export-schemas(or inspect src/devops_cli/ai/mcp/server.py) and confirm sandbox_audit appears in the tool list adjacent to sandbox_deploy. - Criterion 3: DECLARED column derives from the production _build_create_kwargs in both runners (sandbox/engine.py and docker/sandbox.py), not from a hardcoded literal
Verification: Unit test: patch _build_create_kwargs to return a modified kwarg set, run the audit, and assert the DECLARED column reflects the modified values. Confirm commands/sandbox.py no longer contains a literal control list. - Criterion 4: Both dry-run summaries (commands/sandbox.py and docker/sandbox.py) read the same kwargs from _build_create_kwargs
Verification: Runuv run devops sandbox deploy --dry-runanduv run devops docker sandbox --dry-runand confirm both print identical control sets derived from the same source. - Criterion 5: ENGINE column comes from a new DockerEngineService.security_options() method that calls client.info()['SecurityOptions'] via the docker SDK
Verification: Unit test: mock client.info() to return {'SecurityOptions': ['name=seccomp,profile=builtin', 'name=cgroupns']} and assert the ENGINE column shows seccomp=builtin. Confirm the method exists on DockerEngineService in src/devops_cli/docker/engine.py. - Criterion 6: An unreachable daemon reports 0 enforced controls plus the reason for the failure
Verification: Unit test: mock client.info() to raise a connection error and assert the audit output shows 0 enforced and a human-readable reason string. - Criterion 7: A mocked daemon reporting profile=unconfined lowers ENFORCED while DECLARED stays constant
Verification: Unit test: mock client.info() to return {'SecurityOptions': ['name=seccomp,profile=unconfined']} and assert the seccomp row shows DECLARED=yes, ENGINE=unconfined, ENFORCED=no, while other DECLARED rows remain unchanged. - Criterion 8: --probe flag runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success for io_uring_setup, unshare(CLONE_NEWUSER), ptrace, mount, non-loopback connect, writes outside /tmp and /workspace, and forks past pids_limit
Verification: Integration test (skipped when no daemon): runuv run devops sandbox audit --probeagainst a live daemon and confirm each probed control shows a concrete result (EPERM, ENOSYS, or success) rather than a placeholder. - Criterion 9: An unprobed control reads 'not probed', never 'enforced'
Verification: Unit test: run the audit without --probe and assert every ENFORCED cell that has no probe result reads exactly 'not probed'. - Criterion 10: seccomp_profile field on SandboxDeployConfig and WorkloadSandboxConfig reads an OCI profile, rejects a missing or SCMP_ACT_ALLOW defaultAction, and passes security_opt with seccomp= prefix
Verification: Unit test: set seccomp_profile to a valid OCI profile JSON and assert the create kwargs include security_opt with seccomp= prefix. Set it to a profile with defaultAction SCMP_ACT_ALLOW and assert a ValidationError is raised. Set it to a missing file and assert a ValidationError. - Criterion 11: The harness shell tool (ai/harness/shell.py) is listed in the audit as enforcing no container control
Verification: Runuv run devops sandbox auditand confirm a row for the harness shell tool shows DECLARED=no, ENGINE=n/a, ENFORCED=no with a note about process-group isolation only.
Key questions
- How many PRs does this issue split into and what does each deliver?: Three sequential PRs. PR1: devops sandbox audit command and MCP tool with DECLARED (from _build_create_kwargs) and ENGINE (from security_options()) columns, unified dry-run summaries, and the DockerEngineService.security_options() accessor. PR2: --probe flag that runs the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE and records EPERM/ENOSYS/success per syscall, with unprobed controls reading 'not probed'. PR3: seccomp_profile field on both config models reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passing security_opt with seccomp= prefix. (proposed) [sources: src/devops_cli/sandbox/engine.py, src/devops_cli/docker/sandbox.py, src/devops_cli/docker/engine.py, src/devops_cli/ai/mcp/server.py]
- What is the relationship with issue feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117, which plans the same security_options() accessor?: Whichever of feat(cli): sandbox enforcement audit declared vs engine vs enforced (
devops sandbox audit) #698 and feat(docker): container commands find a Podman engine before Docker's default socket, and rootless sandboxes run as the host user #1117 lands first adds the security_options() accessor; the other reuses it. They are not strictly sequential but must coordinate on the shared method in DockerEngineService. (proposed) [sources: src/devops_cli/docker/engine.py] - What is the relationship with issue fix(security): the host sandbox declares a noexec /tmp it never applies #798 (noexec /tmp policy)?: fix(security): the host sandbox declares a noexec /tmp it never applies #798 is already delivered (Done in v0.2.32). Its change to the shared policy must keep noexec for the containers, which the audit's DECLARED column will reflect. No further work is needed from feat(cli): sandbox enforcement audit declared vs engine vs enforced (
devops sandbox audit) #698 beyond reading the existing policy. [sources: docs/ROADMAP.md] - Should the vibes tools/seccomp_synthesizer.py be ported into devops-cli?: No. The engine's builtin seccomp profile is the maintained default-deny artifact. Tighter profiles come from a maintained tracer (oci-seccomp-bpf-hook), audit-confirmed. PR3 reads an OCI profile file rather than synthesizing one. (proposed) [sources: src/devops_cli/sandbox/models.py, src/devops_cli/docker/sandbox.py]
- Which image does the --probe flag use?: DEFAULT_SANDBOX_IMAGE from config/defaults.py:641. [sources: src/devops_cli/config/defaults.py]
- How is network egress tested in the probe?: By reachability, not by syscall. Measured: socket(AF_INET) succeeded inside --network none, so the probe must attempt a non-loopback connect and check whether it reaches a destination, rather than checking whether the socket() syscall itself is blocked. (proposed) [sources: src/devops_cli/docker/sandbox.py]
- What is the milestone and timing constraint?: Milestone v0.2.34 (per the generated roadmap). PR1 and PR2 must land before v0.3.2's Automated Triage & Sandbox Repro Validator, the first feature to run issue-supplied code in the sandbox. PR3 may slip to v0.3.4 if milestone load forces a cut. [sources: docs/ROADMAP.md]
- What is the testing environment constraint?: The user's host is rootless Podman. ENGINE must be tested against both option sets (builtin and unconfined) via mocked info() responses, not against a live daemon, to avoid coupling tests to a specific container runtime. (proposed) [sources: src/devops_cli/docker/engine.py, tests/test_workload_sandbox.py]
Fit
Needs splitting into 3 items:
- PR1: devops sandbox audit command and sandbox_audit MCP tool with DECLARED and ENGINE columns, unified dry-run summaries reading _build_create_kwargs, and DockerEngineService.security_options() accessor
- PR2: --probe flag running the runner's identical kwargs on DEFAULT_SANDBOX_IMAGE, recording EPERM/ENOSYS/success per syscall, with unprobed controls reading 'not probed'
- PR3: seccomp_profile field on SandboxDeployConfig and WorkloadSandboxConfig reading an OCI profile, rejecting SCMP_ACT_ALLOW defaultAction, passing security_opt with seccomp= prefix
Suspected block
None.
Dependencies
#1117
[end-marker]
Reopened on 2026-10-23 after an early close
devops roadmap close closed this issue on 2026-10-22 after the first part (#1831). The text of that pull request held the words "the pull request that" followed by a closing keyword and this issue number, and the parser read the sentence as a closing link. The pull request itself said Part of. The closing was wrong, because the first part builds only the data sources.
Delivered in v0.2.39 (#1831):
DockerEngineService.security_info()returns the security facts of the daemon, and the error of an unreachable daemon is no longer cached as an empty list.- Each runner declares its controls without an engine call, and the two dry runs print the same data.
Not delivered. These parts stay open and carry no milestone until the roadmap jobs place them:
devops sandbox auditand thesandbox_auditMCP tool, with the columns DECLARED, ENGINE and ENFORCED.- The
--probeflag, which runs the identical kwargs on the default sandbox image and readsnot probedfor anything unproven. - The seccomp profile PR. The owner dropped it from v0.2.39 into a follow-up issue.
The pull request that finishes this issue adds changelog.d/698.md.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Sep 30, 2026
Moved from v0.2.25 to v0.2.26. v0.2.25 is capped at 12 items (#740): it keeps #739-#742, their dependency #704, and the oldest P1 items. This P1 item is next in line.
dan-petty commentedon Oct 1, 2026
Moved from v0.2.26 to the backlog. After the v0.2.23 P1 leftovers were retargeted (they were committed earlier), v0.2.25 and v0.2.26 are full at 12 items each, and the roadmap-service items placed in v0.2.26 stay. It is next in line for a planned release.
18 remaining items
dan-petty commentedon Oct 17, 2026
Ready: implementation plan (refined 2026-10-17 at 3dd7fa6)
This section supersedes any text below that conflicts with it.
Decisions
--probe): ENFORCED readsyesonly from a probe result. It readsnofrom a probe, or without a probe from a definite negative: the engine reportsprofile=unconfinedfor seccomp, the engine reportsPidsLimit: false, or the runner has no way to apply the control. Everything else readsnot probed: <reason>, so a positive engine answer such asprofile=builtinstill readsnot probed: run with --probe. A negative needs no kernel run to be true, and a positive one is the vibes 8/8 defect if printed asyes.info()call.SecurityOptionsfeeds the seccomp row and an informational rootless row, andPidsLimitfeeds the pids row; a key the engine omits (Podman's compat API may omit some) readsnot reported, which is not a negative. These are the only engine facts that bear on the declared controls.security_options(): a newDockerEngineService.security_info()returns a frozen model with the options,PidsLimitand anerrorstring (bounded to 256 characters). It never raises, caches a success for the normal TTL and a failure for 2 s, asping()does.security_options()andis_rootless()read it, so one call backs all three. The audit needs the reason; the other callers keep their behaviour._build_create_kwargs: each runner gets a puredeclared_controls(): no engine call, no_ensure_internal_network(), no trace injection._build_create_kwargsstarts from it, anddeploy()andrun()perform the side effects afterwards. The user string (which asks the engine whether it is rootless) stays out of the declared controls. The audit and the dry-runs must not touch the engine (tests/test_sandbox_lifecycle.py:524already pins that for the deploy dry-run).DEFAULT_SANDBOX_POLICY), so a whitelist without a proxy never reaches the builder. There are no flags besides--probeand--json. Auditing user configs can come later; every sandbox command starts from these defaults./tmpnoexec, network isolation and read-only workspace mount. A control with no meaning for a runner is left out rather than shown asn/a.src/devops_cli/sandbox/host.py) gets its own rows. DECLARED reads whatHostSandbox.build_bwrap_argspasses. cap_drop and no-new-privileges readbubblewrap default, because bubblewrap drops capabilities and sets no_new_privs on its own; a probe confirms that. pids_limit,/tmpnoexec and seccomp readnot applied, so ENFORCED isno: bubblewrap has no pids or noexec option (the comment athost.py:34-35), and devops-cli passes no seccomp filter. ENGINE readsn/aplus whetherbwrapis executable. The policy object declares controls this runner never applies, which is exactly what the audit exists to show.none (process-group isolation only), ENGINEn/a, ENFORCEDno. Criterion 11 asks for it, and it costs one row.--jsonrows. A report that fails on the host rows' permanentnowould always fail.python3 -I -c.DEFAULT_SANDBOX_IMAGEispython:3.14-slim, which has no perl. It callsio_uring_setupthroughctypessyscall(425, ...)(the same number on x86_64 and arm64), and callsunshareandmountthrough the libc wrappers. Capabilities, no_new_privs and the seccomp mode are read from/proc/self/status(CapEff,CapBnd,NoNewPrivs,Seccomp) rather than tried one syscall per capability, so ptrace needs no probe of its own. The kernel's own report is exact and needs no extra tooling.connect()to192.0.2.1:9(RFC 5737).ENETUNREACHmeans no route, so the row is enforced; success means a route exists, so it is not enforced. A UDP connect only selects a route and sends no packet. The body measured thatsocket()succeeds under--network none, so the test must be about reachability, and it must stay offline.pids_limit + 1children, which block on a pipe and are reaped. It never runs on the host runner, where no pids limit applies. The integration test audits a policy withpids_limit=16. That keeps it bounded and avoids anything like a fork bomb (AGENTS.md).--probeoffline: the probe never pulls.images.get(image)runs first, and onImageNotFoundevery row of that runner readsnot probed: image absent (pull <image> to probe), with no container created. An unreachable engine readsnot probed: engine unreachable: <reason>, and an absentbwrapreadsnot probed: bwrap absent. So the probe never needs network access, like the body's--pull=nevermeasurement._build_create_kwargs, with onlycommandreplaced, and force-removed infinally. The workspace is a fresh empty temporary directory, never the current directory. The probe calls the engine's create, start, wait and remove directly, notdeploy(), so nothing is registered and no host port is allocated. The run is bounded by a newDEFAULT_SANDBOX_AUDIT_PROBE_TIMEOUT_SECONDSinsrc/devops_cli/config/defaults.py. Identical kwargs are the whole point; a probe must expose no user file, leave no state behind, and never hang the CLI.seccomp_profilelives: one field onSandboxPolicy(src/devops_cli/sandbox/models.py:408), not two on the configs. Both runners already render the policy throughto_docker_security_kwargs, so one field reaches both. A path is read and validated at load. The profile is refused when the file is missing, is not JSON, or has nodefaultAction. It is also refused whendefaultActionis not one of the denying OCI actionsSCMP_ACT_ERRNO,SCMP_ACT_KILL,SCMP_ACT_KILL_PROCESS,SCMP_ACT_KILL_THREADorSCMP_ACT_TRAP, soSCMP_ACT_ALLOWandSCMP_ACT_LOG(which also allows) are refused. That set is a closed enum from the OCI runtime spec, declared insrc/devops_cli/config/constants.py. It is rendered assecurity_opt: ["seccomp=<compact JSON>"]. The host runner shows it asnot applied. Stricter than the body, which refused onlySCMP_ACT_ALLOW.seccomp_synthesizer.py: no. The engine's builtin profile is the maintained default; a tighter profile is a user-supplied OCI file.declared_security_summary: deleted. Its two callers (commands/sandbox.py:185and the tests) move todeclared_controls(). Pre-1.0, so there is no alias.Delivery
security_info();declared_controls()onWorkloadSandboxEngineandWorkloadSandboxRunner, with both dry-runs printing it; the row model and audit builder in a newsrc/devops_cli/sandbox/enforcement_audit.py(DECLARED, ENGINE, and ENFORCED limited to the no-probe rules); host and harness rows;devops sandbox audit [--json]; thesandbox_auditMCP tool; help strings; regenerated CLI docs; and a newchangelog.d/698.mdfragment (PR 2 and PR 3 each add their own line to it). Refs feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698. Tests first: mockedinfo()returning builtin, unconfined, rootless,PidsLimit: false, missing keys, and raising; a parity test per runner that the create kwargs passed to the mocked SDK contain exactlydeclared_controls(); the deploy and workload dry-runs printing the same controls for the same policy;declared_controls()withget_engine,_ensure_internal_networkandinject_trace_envpatched to fail; no cell readingyeswithout--probe; host rows frombuild_bwrap_args; the MCP tool's command line. Files:src/devops_cli/docker/engine.py,src/devops_cli/sandbox/engine.py,src/devops_cli/docker/sandbox.py,src/devops_cli/sandbox/models.py,src/devops_cli/sandbox/host.py,src/devops_cli/sandbox/enforcement_audit.py(new),src/devops_cli/commands/sandbox.py,src/devops_cli/commands/docker.py,src/devops_cli/commands/test_cmd.py,src/devops_cli/ai/mcp/server.py,src/devops_cli/lang/en/help.py,tests/test_sandbox_enforcement_audit.py(new),tests/test_docker_engine.py,tests/test_sandbox_lifecycle.py,tests/test_workload_sandbox.py,changelog.d/698.md, and the existing task filedocs/agent/tasks/task-698-sandbox-enforcement-audit-declared-vs-engine-vs-enforced-dev.md, rewritten to this plan, with its stalev0.2.24milestone line and old line references removed (PR 3 sets**Status**: Done).--probe, with the probe script, the evidence-to-row mapping, the image-absent, engine-unreachable and bwrap-absent paths, the timeout default and anenginepytest marker. Refs feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698. Tests first: canned probe output (JSON lines) for each errno turning into the expectedyes/noper row;ImageNotFoundgivingnot probed: image absentwithcontainers.createnever called; the container force-removed when the probe times out; the host fork probe never scheduled; the probe's command and workspace bind being the only kwargs that differ from_build_create_kwargs; no registry entry written; an integration test markedengine(skipped without a reachable engine or without the image locally, registered the waybwrapis attests/conftest.py:1188-1191andpyproject.toml:157-159) that probes the workload runner withpids_limit=16. Files:src/devops_cli/sandbox/enforcement_probe.py(new, the in-container script),src/devops_cli/sandbox/enforcement_audit.py,src/devops_cli/commands/sandbox.py,src/devops_cli/ai/mcp/server.py,src/devops_cli/config/defaults.py,src/devops_cli/lang/en/help.py,tests/conftest.py,pyproject.toml,tests/test_sandbox_enforcement_audit.py,tests/test_sandbox_enforcement_probe.py(new), the task file,changelog.d/698.md.SandboxPolicy.seccomp_profile, its validation, its rendering into_docker_security_kwargs, and its DECLARED cell. Closes feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698. Tests first: a validSCMP_ACT_ERRNOprofile rendersseccomp=<compact JSON>in both runners' create kwargs; a missing file, invalid JSON, a missingdefaultAction,SCMP_ACT_ALLOWandSCMP_ACT_LOGeach raise a validation error naming the field; the audit's DECLARED seccomp cell names the profile path and the first 12 hex digits of its sha256; the host seccomp row staysnot applied. Files:src/devops_cli/sandbox/models.py,src/devops_cli/config/constants.py,src/devops_cli/sandbox/enforcement_audit.py,tests/test_sandbox_lifecycle.py,tests/test_sandbox_enforcement_audit.py, the task file,changelog.d/698.md.Acceptance criteria
uv run devops sandbox auditprints, per runner (deploy engine, workload runner, host bubblewrap, harness shell), one row per control with the columns DECLARED, ENGINE and ENFORCED, and a summary line "Enforced: N of M";--jsonemits the same rows.sandbox_auditMCP tool sits besidesandbox_deploy(src/devops_cli/ai/mcp/server.py:1564), runsdevops sandbox audit --json, adds--probewhenprobe=True, and is annotatedreadOnlyHint: Falsebecause a probe starts and removes a container.declared_controls(). For each runner, the create kwargs sent to a mocked SDK contain exactly those controls.commands/sandbox.pyholds no literal control list, anddeclared_security_summaryis gone.devops sandbox deploy --dry-runanddevops docker sandbox --dry-run) print the same controls for the same policy, and neither touches the engine.info():profile=builtingives seccomp ENGINEbuiltinand ENFORCEDnot probed: run with --probe;profile=unconfinedgives ENFORCEDno, with DECLARED unchanged;PidsLimit: falsegives pids ENFORCEDno; a missing key gives ENGINEnot reported; a raisinginfo()gives ENGINEunreachable: <reason>(at most 256 characters), noyesanywhere, and the reason in the summary.--probe, no ENFORCED cell readsyes.bubblewrap default; pids_limit,/tmpnoexec and seccomp read DECLAREDnot appliedand ENFORCEDno.--probebuilds the probe container from the runner's own create kwargs (onlycommandand the empty temporary workspace differ), never pulls, registers nothing, and removes the container even on timeout. Absent image, unreachable engine and absentbwrapeach produce theirnot probed: <reason>rows.mountfailing → cap_drop;NoNewPrivs: 1→ no-new-privileges;Seccomp: 2, plusio_uring_setupandunshare(CLONE_NEWUSER)failing with EPERM or ENOSYS → seccomp; a fork failing with EAGAIN at or beforepids_limit + 1→ pids_limit; a file create under/failing with EROFS → read-only root; exec of a file written to/tmpfailing with EACCES → noexec; UDP connect to192.0.2.1:9failing with ENETUNREACH → network; a write under/workspacefailing with EROFS → read-only workspace.pids_limit + 1children.SandboxPolicy.seccomp_profilerefuses a missing file, invalid JSON, a missingdefaultActionand any non-denying action (SCMP_ACT_ALLOW,SCMP_ACT_LOGincluded), and rendersseccomp=<compact JSON>in both runners.trace_span.uv run devops cipasses,uv run devops docs checkpasses, andchangelog.d/698.mdexists; CHANGELOG.md and docs/ROADMAP.md are not edited.uv run devops sandbox audit --probeon the rootless Podman workstation, withpython:3.14-slimalready pulled, and paste the table into PR 2.Current references
WorkloadSandboxEngine._build_create_kwargs(deploy engine):src/devops_cli/sandbox/engine.py:255; whitelist-without-proxy raise:297-300; trace injection:311;_resolve_user_string:71;_ensure_internal_network:78WorkloadSandboxRunner(workload runner):src/devops_cli/docker/sandbox.py:140;build_dry_run_details:160;_network_create_kwargs:201, internal-network side effect:209;_build_create_kwargs:231, trace injection:240;resolve_sandbox_user(engine call):50-61;WorkloadSandboxConfig:64DockerEngineService:src/devops_cli/docker/engine.py:242;client():404;ping()short failure TTL:439-450;security_options()(swallows and caches the error):454-466;is_rootless():468CONST_SECURITY_OPT_ROOTLESS:src/devops_cli/config/constants.py:1899SandboxPolicy:src/devops_cli/sandbox/models.py:408;to_docker_security_kwargs:425;declared_security_summary:436;SandboxDeployConfig:460src/devops_cli/commands/sandbox.py:185;deploycommand:102src/devops_cli/commands/docker.py:564,src/devops_cli/commands/test_cmd.py:411sandbox_deploysrc/devops_cli/ai/mcp/server.py:1564; the read-only tool patternsandbox_status:1671-1684SandboxCommandHelpsrc/devops_cli/lang/en/help.py:1640DEFAULT_HOST_SANDBOX_POLICYand the noexec commentsrc/devops_cli/sandbox/host.py:34-38;HostSandbox:414;build_bwrap_args:503-535src/devops_cli/ai/harness/shell.py:317DEFAULT_SANDBOX_IMAGE(python:3.14-slim):src/devops_cli/config/defaults.py:741;DEFAULT_SANDBOX_PIDS_LIMIT::744tests/test_sandbox_lifecycle.py:656-660,tests/test_workload_sandbox.py:90-92and:188-202; deploy dry-run makes no engine lookup:tests/test_sandbox_lifecycle.py:524; engine rootless:tests/test_docker_engine.py:859tests/conftest.py:1188-1191,pyproject.toml:157-159Dependencies and order
security_options()), fix(security): the host sandbox declares a noexec /tmp it never applies #798 (host noexec) and feat(cli): bubblewrap confinement for criteria commands and one sandbox policy #592 (both runners take the policy): closed. Nothing blocks PR 1.src/devops_cli/sandbox/models.py(:155-299). PR 1 and PR 3 editSandboxPolicyin the same file (:408-438). The regions do not overlap. Land fix(security): reference_extractor classifies addresses with ipaddress, and the sandbox local whitelist stops mapping host.docker.internal to pod loopback #1174 first, as it is a P1 security fix already in v0.2.37; whichever of these PRs lands later rebases.declared_controls(). PR 3 needs PR 1's DECLARED cell. Merge in order PR 1, PR 2, PR 3.feat(sandbox): declare runner controls without an engine call and rep…
dan-petty commentedon Oct 22, 2026
What changed
#1831, merged into
release/v0.2.39as 63f3655.14 file(s) changed.
How it was verified
Check runs at 39a949d:
Acceptance Criteria of
docs/agent/tasks/task-698-sandbox-enforcement-audit.md:security_info()reports builtin and unconfined seccomp, a rootless engine,PidsLimit: false, omitted keys as unreported, and an unreachable daemon as a bounded reason, without raising (tests/test_docker_engine.py).info()call backssecurity_info(),security_options()andis_rootless(); a failed answer is asked again after 2 s and a good one after the normal cache lifetime (tests/test_docker_engine.py).tests/test_sandbox_lifecycle.py).declared_controls()makes no engine request, and a whitelist mode without an egress proxy declares its network while creating the container still refuses it (tests/test_sandbox_lifecycle.py).tests/test_sandbox_networking.py).tests/test_sandbox_lifecycle.py,tests/test_workload_sandbox.py).devops sandbox audit [--json]command, itssandbox_auditMCP tool and the DECLARED, ENGINE and ENFORCED columns, with the host bubblewrap and harness shell rows: the nextPart of #698pull request.devops sandbox audit --probe, which runs the runner's own kwargs against the kernel to turnnot probedcells intoyesorno, and the person-run check of it on the rootless Podman workstation: the pull request that closes feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698.SandboxPolicy.seccomp_profile: dropped from feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698 on the owner's decision. No command or setting builds a custom containerSandboxPolicy, so the field would be unreachable until one does. It is tracked as #1822.dan-petty commentedon Oct 23, 2026
What changed
#1831, merged into
release/v0.2.39as 63f3655.14 file(s) changed.
How it was verified
Check runs at 39a949d:
Acceptance Criteria of
docs/agent/tasks/task-698-sandbox-enforcement-audit.md:security_info()reports builtin and unconfined seccomp, a rootless engine,PidsLimit: false, omitted keys as unreported, and an unreachable daemon as a bounded reason, without raising (tests/test_docker_engine.py).info()call backssecurity_info(),security_options()andis_rootless(); a failed answer is asked again after 2 s and a good one after the normal cache lifetime (tests/test_docker_engine.py).tests/test_sandbox_lifecycle.py).declared_controls()makes no engine request, and a whitelist mode without an egress proxy declares its network while creating the container still refuses it (tests/test_sandbox_lifecycle.py).tests/test_sandbox_networking.py).tests/test_sandbox_lifecycle.py,tests/test_workload_sandbox.py).devops sandbox audit [--json]command, itssandbox_auditMCP tool and the DECLARED, ENGINE and ENFORCED columns, with the host bubblewrap and harness shell rows: the nextPart of #698pull request.devops sandbox audit --probe, which runs the runner's own kwargs against the kernel to turnnot probedcells intoyesorno, and the person-run check of it on the rootless Podman workstation: the pull request that closes feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698.SandboxPolicy.seccomp_profile: dropped from feat(cli): sandbox enforcement audit declared vs engine vs enforced (devops sandbox audit) #698 on the owner's decision. No command or setting builds a custom containerSandboxPolicy, so the field would be unreachable until one does. It is tracked as #1822.feat(release): v0.2.39 (#1947)